Bug 35866

Summary: JUnit task should show which test case failed
Product: Ant Reporter: Chris Wilson (Aptivate) <chris+apache>
Component: Optional TasksAssignee: Ant Notifications List <notifications>
Status: ASSIGNED ---    
Severity: enhancement CC: chris+apache, varavamu
Priority: P2 Keywords: PatchAvailable
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: other   
Attachments: Patch to make Ant JUnit task log which tests failed to Ant's logging system

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

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. ***