Bug 41534 - "quiet" Formatter for Ant's JUnit Task
Summary: "quiet" Formatter for Ant's JUnit Task
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: unspecified
Hardware: All other
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL: http://www.superscalar.org/files/apac...
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2007-02-02 20:29 UTC by Mathias Ricken
Modified: 2009-07-31 07:02 UTC (History)
0 users



Attachments
Patch file based on Ant revision 503170 (11.25 KB, patch)
2007-02-02 20:30 UTC, Mathias Ricken
Details | Diff
Patch file based on Ant revision 638724 (21.81 KB, patch)
2008-03-19 00:56 UTC, Mathias Ricken
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Ricken 2007-02-02 20:29:26 UTC
Hi!

I found the output of "brief" still too verbose, so I created a different
formatter for Ant's JUnit task. It is based on "brief", and I decided to call it
"quiet". It only prints any output if a test fails. 

For this change, I had to modify FormatterElement.java and JUnitTask.java, and
add QuietJUnitResultFormatter.java.

I created a website that has complete source and binary tar.gz
distributions of a modified Ant 1.7.0 available, as well as a tar.gz
file with just the three Java files named above. It is available at:

http://www.superscalar.org/files/apache-ant-1.7.0-quiet/

At this website, you can also see a comparison of the output generated by the
"brief" formatter and the "quiet" formatter I have added.

I have created a patch file using "svn diff > quiet-patch-r503170". It is based
on revision 503170. The patch file is available at:

http://www.superscalar.org/files/apache-ant-1.7.0-quiet/quiet-patch-r503170

Please let me know if you have any interest in integrating this into
future versions of Ant, if I have unknowingly duplicated a feature, or
if I have done something else wrong.

I hope this will be helpful for someone.

Sincerely,

Mathias Ricken
Comment 1 Mathias Ricken 2007-02-02 20:30:19 UTC
Created attachment 19503 [details]
Patch file based on Ant revision 503170
Comment 2 Mathias Ricken 2008-03-19 00:56:22 UTC
Created attachment 21682 [details]
Patch file based on Ant revision 638724

I have created and attached a patch file based on Apache Ant 1.8.0alpha, revision 638724. I hope it will help in implementing this enhancement in version 1.8.0.

It also includes a second formatter, "oneline", that prints one line per test on success and full output on failures or errors. This second formatter has been in the modified code on my website for over a year, just not in the patch file I submitted here.

http://www.superscalar.org/files/apache-ant-1.7.0-quiet/