The following snippet, from another thread, works to print a message and fail after all unit tests have been run :
<fail if="junit.failed" message="Oh no ! There were some failed unit tests :( "/>
However — I don’t see a how can I also record and print the NAMES of the failed tests in junit/ant, after they have all run. Any thoughts on this ?
I believe others would find such function extremely important, so I’m assuming a simple solution exists : its quite tedious to look through hundreds of failed tests for the offenders.
Yes it is. Try using the junitreport task.
e.g.
Try this attribute on your junit task:
printsummary="yes"on junit taskChange your formatter to:
and then create the reports with a target that calls this:
For output :