JUnit report
Testsuite: XSLTTest
Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 0.156 sec
Testcase: test1 took 0.062 sec
Testcase: test2 took 0.094 sec
FAILED
test_title_oops failed!
junit.framework.AssertionFailedError: test-title-oops failed!
at XSLTTest.run(XSLTTest.java:53)
at XSLTTest.test1(XSLTTest.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Ah, now we can see which of our tests failed.
This is looking better.
But still some distance from ideal. We've test names duplicated in the test definition and the Java code. Everytime we add a test we need to change the Java. We've got hardcoded filenames in the Java, as well as in the Ant script. If we want to add more test suites (test defs) we've got to do all this again.
Are we actually making more work for ourselves, rather than less?
Let's look at the Java again.