Bug 35866 - JUnit task should show which test case failed
JUnit task should show which test case failed
Status: ASSIGNED
Product: Ant
Classification: Unclassified
Component: Optional Tasks
unspecified
All other
: P2 enhancement (vote)
: ---
Assigned To: Ant Notifications List
: PatchAvailable
: 34924 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2005-07-26 14:02 UTC by Chris Wilson (Aptivate)
Modified: 2009-08-18 07:13 UTC (History)
2 users (show)



Attachments
Patch to make Ant JUnit task log which tests failed to Ant's logging system (1.76 KB, patch)
2005-07-26 14:03 UTC, Chris Wilson (Aptivate)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Wilson (Aptivate) 2005-07-26 14:02:36 UTC
There is no way to show the failed testcase in the summary output from JUnit. 
This would be very useful for continuous integration tools like Anthill, where 
the output from JUnit is all that gets emailed to the user when a build fails. 
 
The attached patch causes the summary formatter to always write the failed 
test summary to the Ant logger. It should probably be made conditional on some 
new property, but I don't know Ant well enough to know how that should be 
done. Any advice or comments would be appreciated. 
 
Cheers, Chris.
Comment 1 Chris Wilson (Aptivate) 2005-07-26 14:03:35 UTC
Created attachment 15779 [details]
Patch to make Ant JUnit task log which tests failed to Ant's logging system
Comment 2 Steve Loughran 2007-12-09 13:39:56 UTC
I'm looking at this. 
1. yes, it makes sense
2. I don't want to surprise people with a more verbose option.

I'm going to initially patch it at the -v level, but we may want to think about
a  VerboseSummaryLogger that people could switch to. Or, we drive off a system
property
Comment 3 Steve Loughran 2007-12-09 14:43:08 UTC
Looking at the code for this, I dont see there's much here that the brief
formatter doesn't do, and not worth the effort to write/test/document another
formatter.

Why not just switch from summary formatter to brief?
Comment 4 Chris Wilson (Aptivate) 2007-12-10 03:19:05 UTC
Sure, we can switch formatters, but the summary formatter does not seem very
useful if it gives so little information.
Comment 5 Steve Loughran 2007-12-10 05:32:33 UTC
-its generally expected to run side-by-side with the junit formatter, so you run
the summary to see if tests passed/failed, then switch to the generated XML/HTML
results on failure. If the tests passed, you dont care what happened (unless you
are being naughty and expecting people to look at the system.out to decided if a
test really worked)
Comment 6 Stefan Bodewig 2009-07-30 06:06:40 UTC
*** Bug 34924 has been marked as a duplicate of this bug. ***