ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: junit test runner enhancements
Date Wed, 13 Apr 2005 21:08:12 GMT
Phil Weighill Smith wrote:
> Steve,
> I've not written any code to help here, but thought the following issue
> could also be considered:
> When executing a test class that has no test methods what-so-ever (e.g.
> someone comments out all tests for some reason) the runner currently
> barfs instead of ignoring the test class.
> Phil :n.

I looked at the code there and it is tough. Seems to me that junit will 
run any class with the right constructor, and a set of methods called 
testSomething() ... there is no need for you to extend TestCase.

Adding a check for abstract is easy, though the current logic is only 
really set up for exceptions during instantiation, not skipping. That is 
easy to fix. Skipping classes with no test means we'd have to mimic 
junit and examine all the methods.

Can I suggest
(a) having your own super class for tests
(b) having a testNoop() there. It isnt ideal, as it skews your stats. 
but in a postive way :)


(c) turn whole tests off, rather than comment them out. that is what i do

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message