db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Korneliussen <Andreas.Kornelius...@Sun.COM>
Subject Re: [jira] Commented: (DERBY-1141) test harness usage of useprocess needs improvement
Date Thu, 20 Apr 2006 10:36:55 GMT

> When running "junit.textui.TestRunner <testClass>" (as a stand-alone 
> process,
> useprocess=true) junit extracts the TestSuite (extending from Test) from 
> the
> suite() method if there is such a method, and runs it.
> If there is no such method, the JUnit TestRunner (in
> junit.runner.getTest(...)) creates a suite which includes all methods
> starting with "test", and runs this instead.
> I am assuming that we want the same behavior when running with 
> useprocess=false.
> Since the TestRunner.main() method contains System.exit() calls, I suggest
> invoking junit by:
> a) Passing the TestSuite object returned from the suite() method to
> junit.textui.TestRunner.run(), if such a suite() method exists.
> or
> b) (if a suite() method does not exist) Passing a new TestSuite object to
> junit.textui.TestRunner.run(), perhaps as shown in the old code comments in
> RunTest.java shown in the nabble thread referred to above. This suite will
> contain all methods starting with "test" in the test class.
> If this sounds acceptable, I can try to get this to work with the derby 
> test
> harness and (if successful) provide a patch for it.

I think this sounds acceptable, for solving the useprocess problem. I do 
however think writing a new TestRunner class could be very useful, not 
only for solving this specific issue.  So, if you do not want to make a 
new TestRunner class now, I may do so later.


View raw message