jastrachan | 5 Jul 11:00 2004
Picon

Re: Running unit tests with the groovy command-line tool

On 4 Jul 2004, at 18:09, Guillaume Laforge wrote:
> bing ran wrote:
>> what if the test case class also has a execution entry point, meaning 
>> a
>> valid public static void main()? I know some of the test cases do.
>
> Well, that's a good question :-)
> If you have JUnit on your classpath, the test will be run by the 
> TestRunner, otherwise, the main method will be used.

Maybe we should change it that if the class does not have a static main 
method then it will try running it with TestRunner?

Incidentally, another tweak I'd like is, if a class is not a test case 
or have a main method but implements Runnable, then try instantiating 
the class (using a zero argument constructor, or one that takes a 
String[] args parameter), then call run().

James
-------
http://radio.weblogs.com/0112098/


Gmane