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
antunit.

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
File("src/test/java/net/sourceforge/deco/ant/test-compilepath.xml");
                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: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to