ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <>
Subject Integration of antunit in junit
Date Wed, 14 Jan 2009 20:02:07 GMT
While testing ant tasks in my toy project (deco), I have used antunit.

It is very useful, but I found one limitation: I couldn't not run the
ant-unit tests in the junit runner of my ide.

ant-testutils.jar provides some support for that, but requires to
duplicate all antunit test target into java TestCase method.  This is
a useless overhead now that we have most checks that can be done in

An adaptation layer allow to see antunit test results directly with
the classical green/red bar of you junit runner.  It also allow to
very easily plug a java debugger.

I already some code prepared to support this.  The adaptation layer :

public class CompilePath extends TestCase {
	public static TestSuite suite() {
		File script = new
		return new AntUnitSuite(script);		

When executed into a Junit Runner (for example in eclipse), we will
see a suite name "test-compilepath" that will have one test for each
testXXX target into my ant unit script.

Before check-in the code, I would like to have a feed back to know if
I'm the only one to find it useful, and if that doesn't contradict
with the current antunit philosophy.
(if you prefer first see what it looks like, I can also check-in the
code in a sandbox)

Gilles Scokart

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

View raw message