ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: can I change junit runner main class
Date Tue, 10 Feb 2004 07:31:07 GMT
On Mon, 09 Feb 2004, Mariano Benitez <> wrote:

>     The problem is that I cannot simulate this using JUnit with
>     fork, because I cannot change the main class and use mine
>     instead.

I assume that your class understands all the command line arguments
Ant's testrunner uses and passes them along.  How would your class
deal with new arguments we add?

The main problem with opening up access to the test runner class is
just that.  As soon as we do it, we run the risk of breaking other
people's builds when we change the protocol between the task and the
test runner.  There is no danger now, as we always know the main class
that gets invoked.

> 1) leave <junit forked="true" jvm="launcher"> and have "launcher"
> script change the command line

Ugly but portable accross Ant versions.

> 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)

Both cases are dangerous for us to do as they make future development
more difficult for us.  If we'd choose either one, we'd have to come
up with a strict contract for the boot class first.


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

View raw message