Updated Java driver
public void test1()
{
runTest("test_title");
}
public void test2()
{
runTest("test_title_oops");
}
public void runTest(String testName)
{
DOMResult resultsink = new DOMResult();
Transformer tests = createTrans(loadSource("xslt_unit_test.xsl"));
tests.setParameter("test-name", testName);
tests.transform(loadSource("test_data.xml"), resultsink);
...
}
Factor out most of the existing code to a helper class. Pass it the name of the test to run.