Browse files

Made ant target 'junit-test' produce a report like all the other

junit ant targets. The report is useful because for a test class
with many sub-tests, the report clearly explains which sub-tests
failed. Unlike other ant junit targets, this target also produce
a plain text report. The plain text report is useful for running
a single test in a loop until it fails.

Clarified the help message for the 'junit-test' ant target.
  • Loading branch information...
1 parent cd50792 commit 83014159093a5b0b4de5c0673d6c6bfbaf918f28 @jayjwylie jayjwylie committed Sep 5, 2012
Showing with 16 additions and 3 deletions.
  1. +2 −0
  2. +14 −3 build.xml
@@ -14,6 +14,8 @@ inttestsrc.dir=test/integration
@@ -419,11 +419,22 @@
- <target name="junit-test" depends="build, buildtest, contrib-jar" description="Run single junit test with">
- <junit printsummary="yes" showoutput="true" maxmemory="1024m">
+ <target name="junit-test" depends="build, buildtest, contrib-jar" description="Run single junit test for class ClassName with[ClassName] (Note: Use the class name, not the file name with the .java extension)">
+ <replace-dir dir="${singletestreport.dir}" />
+ <replace-dir dir="${singletesthtml.dir}" />
+ <junit printsummary="on" showoutput="true" maxmemory="1024m">
<classpath refid="contrib-test-classpath" />
- <test name="${}" />
+ <classpath path="${}" />
+ <formatter type="plain" />
+ <formatter type="xml" />
+ <test name="${}" todir="${singletestreport.dir}"/>
+ <junitreport todir="${singletesthtml.dir}">
+ <fileset dir="${singletestreport.dir}">
+ <include name="TEST-*.xml" />
+ </fileset>
+ <report todir="${singletesthtml.dir}" format="frames" />
+ </junitreport>
<target name="junit-all" depends="junit-long, contrib-junit" description="Run All junit tests including contrib.">

0 comments on commit 8301415

Please sign in to comment.