ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Support for JUnit 4?
Date Thu, 23 Feb 2006 14:20:10 GMT
Jon Skeet wrote:
>> On Tue, 21 Feb 2006, Marian Petras <Marian.Petras@sun.com> wrote:
>>
>>> I would like to know about the current status of Ant's support for 
>>> JUnit 4.
>> The junit task currently only supports JUnit 3 style tests, 
>> this means you must wrap your JUnit 4 tests in a 
>> JUnit4TestAdapter in order to run them in Ant.  In order to 
>> change that, Ant would need a different test runner, or at 
>> least a different logic inside the test runner.
> 
> I would suggest a completely new task (or tasks) and that the jar file
> is *not* supplied with stock Ant.
> That way we could get round the nasty problem we've currently got of
> requiring JUnit's jar file to be in the lib directory to get a stock Ant
> install to work.


This is a really good point.  We get to fix a backwards compatibility 
issue here and now.

Or we write <junit4> such that it doesnt need junit on ant's own 
classpath, but instead on a classpath supplied to it.

Except, what do we do about cactus, which is my favourite way of running 
server-side tests? That exends junit and would not migrate to the new world.


> JUnitReport *may* be able to go unchanged - not sure. I've a sneaking
> suspicion that there are changes between JUnit4 and JUnit3 in terms of
> what it can record - there are ignored tests, but there's no longer a
> difference between errors and failures. That's just a memory though, it
> could be wrong.

<junit4report > could go alongside <junit4>



> 
> I don't know how much work is involved in creating a new JUnit4 task or
> tasks, but I'm happy to contribute when I have time. I'm not currently
> working on JUnit4 tests, but I'm bound to at some time - and it would be
> great if Ant supported it at that point! I can't imagine it's *that*
> hard. I may not have enough time to do it all myself, but I'd be happy
> to work on it with someone else.
> 
> I'm also already on the JUnit-devel mailing list - I'm happy to act as a
> conduit, as it were.
> 

cool.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message