https://svn.apache.org/repos/asf/jena/Experimental/new-test/src/test/java/com/hp/hpl/jena/testing_framework/manifest
Has a manifest test annotation, a test runner and a test suite. It looks like it may use junit-contracts ( https://github.com/Claudenw/junit-contracts/) which may bite off more than you want to chew. Give me an example of the file and tests that you want to run and I'll take a crack at them this evening. Claude On Sun, Mar 23, 2014 at 8:11 PM, Andy Seaborne <[email protected]> wrote: > Has anyone got experience of extending JUnit4? > > I want to get rid of the usage of JUnit3-style TestSuite and TestCase. > (Why? No reason other than an itch that using JUnit3 "junit.*" is old > stuff.) > > These are used in the scripted tests because a TestSuite can have variable > number of tests and of variable type, a TestSuiet can contain a TestSuite. > > The working group tests from DAWG, SPARQL-WG and RDF 1.1 are scripted with > an RDF manifest file. A manifest can refer to other manifests. > > JUnit4 parameterized tests are not sufficient. The best I got was to turn > a single manifest into a parameterized test set, with one test per > parameterization. That makes naming messy (I got the class to have the > right name but each class instance has one test called the same thing (e.g. > "test"). I could not see how to include @Parameterized inside a > @Parameterized. > > What I have ended up so far is having to implement a JUnit4 Runner, > actually 3 of them, one to take class to pick out the annotations for the > manifests and two variants for runner that is either a single scripted test > and a test manifest runner including sub-manifests as a tree. > > I know Junti4 is a testing "framework" but I feel I have had to write a > lot of machinery for what was in JUnit3 quite simple. I get the feeling > I've missed something somewhere. > > Any ideas? > > Andy > -- I like: Like Like - The likeliest place on the web<http://like-like.xenei.com> LinkedIn: http://www.linkedin.com/in/claudewarren
