ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariano Benitez <>
Subject can I change junit runner main class
Date Mon, 09 Feb 2004 19:19:29 GMT

    I've been around having this situation and I need advice on how to 
make this work in 1.6. I have had to custom patch a couple of classes in 
1.5.x to make it work, but now I'd like to see if I can do it without 

    We use JUnit tasks extensively in our instalation, and we have to 
"boot" the tests classes with a specific launcher class (much like it is 
done now in Ant 1.6). This class receives the main class, initializes 
some classloaders, and launches the other main application.

    The problem is that I cannot simulate this using JUnit with fork, 
because I cannot change the main class and use mine instead. I have made 
a bash script that    splits Java options from class arguments and puts 
my boot class in the middle, but there are always problems with shell 

    My request is for advice on what option to take, I see at least a 
couple of them:
1) leave <junit forked="true" jvm="launcher"> and have "launcher" script 
change the command line
2) patch junit to allow me to put a boot class
3) extend junit (the problem is that JUnitTask.executeAsForked and 
commandline are private, so I should patch the task anyway)

Thanks for your attention.

MAriano BEnitez
Fuego Labs.
Buenos Aires - Argentina

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

View raw message