John Embretsen wrote:
Andreas Korneliussen wrote:

I propose to introduce a new test type called "junit" (current test types are: sql,sql2,unit,java,multi,demo - unit is not junit)

Then you can use:

java org.apache.derbyTesting.functionTests.harness.RunTest <TestCaseClassName>.junit

to run a Junit test - instead of:

java org.apache.derbyTesting.functionTests.harness.RunTest <AnotherClassWithMainMethod>.java


If I understand this proposal correctly, there will be a one-to-one mapping between so-called ".junit" tests and ".java" files, right? And there will be no actual files ending with ".junit", but the harness will map the test names ending with ".junit" to actual java/class files containing the actual JUnit test code?

Yes, the class name.

The harness uses the extension of the file submitted to figure out the test type.

I.e if it is .sql it starts ij, if it is .java it starts java with the class as argument, if it is unit it starts org.apache.derbyTesting.unitTests.harness.UnitTestMain, if it is multi it starts org.apache.derbyTesting.functionTests.harness.MultiTest

Which java program it starts is defined in the
buildTestCommand(..) method in org.apache.derbyTesting.functionTests.harness.RunTest

The proposal is that if it is junit, it starts "java junit.textui.TestRunner" application with the class as argument.

Andreas

Reply via email to