ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: JUnit task and test suites
Date Thu, 28 Aug 2003 08:15:10 GMT
On Wed, 27 Aug 2003, Samuel Langlois <> wrote:

> Indeed, the limitation lies in the report generated by the runner,
> (i.e. the <junit> Ant task. I am not talking of the <junitreport>
> task!)

The xml formatter, you mean 8-)

OK, all formatter suffer from the same problem.

The workaround for you would be to write a formatter of your own, this
shouldn't be too hard, just copy XMLJUnitResultFormatter (it's not
very extension friendly ATM) and adapt the endTest/startTest methods
to introduce intermediate <testsuite> elements.  Well, not exactly
trivial as you'll have to keep track of the TestSuites to create new
elements on the fly.

It may even be possible that we don't get enough information from the
testrunner to the formatter.  I'd have to look into the swingui
testrunner to see how the JUnit folks do it to be sure.

> The ideal report would keep the TestSuite hierarchy that was built
> using the JUnit API, by adding another level in the XML,

If we do that, we are going to break the stylesheets for <junitreport>
- as we give users a chance to plug in stylesheets of their own, we
can't do that.

We'd have to use a new formatter or add parameters for formatters to
do so.


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

View raw message