Can JUnit Ant job report ignore tests?

We are currently using JUnit 4.4 and Ant 1.7.1 for our builds. I have some test cases @Ignored. When I run them in Eclipse, the JUnit tester reports that they are ignored. I would like them to appear in the XML output from Ant (so I can report this), but they don't seem to exist.

Does anybody work? Is there a switch to turn them on? Update I need to do?

+5
source share
4 answers

This seems to be a known Ant issue / bug .

+5
source

Ant, Ant 1.9.0.

, ant -junit.jar lib Ant Ant. Ant , , 1.9.0 .

0
source

Just tried Ant 1.9.0 with JUnit 4.11. If you use <junit printsummary="on">, you will get output, for example:

[junit] Running com.example.IgnoredTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.01

[junit] Running com.example.PassingTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01

[junit] Running com.example.FailingTest
[junit] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.01

I think it would be preferable if we could get this output with printsummary=off:

[junit] Test com.example.IgnoredTest SKIPPED
[junit] Test com.example.FailingTest FAILED

but it seems that a more detailed conclusion above is the best we can do, unless I miss some obscure trick with one of the arguments to the junit task .

0
source

All Articles