Note that there are some explanatory texts on larger screens.

plurals
  1. POJunit Reports only showing the last class ran when executed with build.xml
    primarykey
    data
    text
    <p>I can get the build.xml to report all of my classes defined by targets if I call test-all, but if i only want to run a few targets my Junit report only show the last class ran. </p> <p>To explain further I have two targets in my build.xml "runAll" and "runTest". When i execute the runAll target I get all my classes to show up in the Junit report. When I run multiple targets using runTest my junit reports only show the last class ran.</p> <p>THIS WORKS AND REPORTS ALL THE CLASSES:<br> ant test-all</p> <p>THIS DOESNT AND ONLY REPORTS THE LAST CLASS:<br> ant testClass1 testClass2 testClass3</p> <p>here is a snippet of what i am running in my build xml for runAll (this one works):</p> <pre><code>&lt;target name="runAll" depends="clean,compile, compileTests"&gt; &lt;taskdef resource="festjunittasks" classpathref="classpath" /&gt; &lt;mkdir dir="${report.dir}"/&gt; &lt;mkdir dir="${results.dir}"/&gt; &lt;mkdir dir="${htmlresults.dir}"/&gt; &lt;!-- &lt;mkdir dir="${iphone.dir}"/&gt; --&gt; &lt;junit forkmode="perTest" printsummary="yes" haltonfailure="no" haltonerror="no" maxmemory="4096m"&gt; &lt;classpath&gt; &lt;path refid="classpath"/&gt; &lt;/classpath&gt; &lt;formatter classname="org.fest.swing.junit.ant.ScreenshotOnFailureResultFormatter" extension=".xml" /&gt; &lt;batchtest fork="yes" todir="${results.dir}"&gt; &lt;fileset dir="${testclasses.dir}" includes="**/*Test*.class" /&gt; &lt;/batchtest&gt; &lt;/junit&gt; &lt;festreport todir="${report.dir}"&gt; &lt;classpath refid="classpath" /&gt; &lt;fileset dir="${results.dir}"&gt; &lt;include name="TEST-*.xml" /&gt; &lt;/fileset&gt; &lt;report format="frames" todir="${htmlresults.dir}/html" /&gt; &lt;/festreport&gt; &lt;copy todir="${history.dir}"&gt; &lt;fileset dir="${html.dir}"/&gt; &lt;/copy&gt; &lt;/target &gt; </code></pre> <p>Here is snippet for my runTest (this one reports only the last class ran):</p> <pre><code>&lt;target name="runTest" depends="clean,compile, compileTests"&gt; &lt;taskdef resource="festjunittasks" classpathref="classpath" /&gt; &lt;mkdir dir="${report.dir}"/&gt; &lt;mkdir dir="${results.dir}"/&gt; &lt;mkdir dir="${htmlresults.dir}"/&gt; &lt;!-- &lt;mkdir dir="${iphone.dir}"/&gt; --&gt; &lt;junit forkmode="perTest" printsummary="yes" haltonfailure="no" haltonerror="no" maxmemory="4096m"&gt; &lt;classpath&gt; &lt;path refid="classpath"/&gt; &lt;/classpath&gt; &lt;formatter classname="org.fest.swing.junit.ant.ScreenshotOnFailureResultFormatter" extension=".xml" /&gt; &lt;batchtest fork="yes" todir="${results.dir}"&gt; &lt;fileset dir="${testclasses.dir}" includes="**/${test.to.run}" /&gt; &lt;/batchtest&gt; &lt;/junit&gt; &lt;festreport todir="${report.dir}"&gt; &lt;classpath refid="classpath" /&gt; &lt;fileset dir="${results.dir}"&gt; &lt;include name="TEST-*.xml" /&gt; &lt;/fileset&gt; &lt;report format="frames" todir="${htmlresults.dir}/html" /&gt; &lt;/festreport&gt; &lt;copy todir="${history.dir}"&gt; &lt;fileset dir="${html.dir}"/&gt; &lt;/copy&gt; &lt;/target &gt; </code></pre> <p>thanks in advance </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload