View Source

To publish [JUnit|] report, you only need two steps:
# Generate JUnit *XML* report from [Ant|] or [Maven|] or any other build tool.
# Add a JUnit report publish step by choosing _Publish -> Junit Report_ in step menu.

h2. Generate JUnit Report

QuickBuild will NOT generate [JUnit|] report automatically, so first make sure the [JUnit|] report is produced by [ANT|] or by any other build tool. The following example shows how to generate JUnit test results with [Ant JUnit task|] and aggregate all the test reports into one by using [Ant JUnitReport task|] (this is not required):
{code:xml|title=JUnit target in build.xml}
<target name="junit" depends="compile.test">
<mkdir dir="${}" />
<mkdir dir="${}/test-out" />
<record name="${}/test-output.txt" append="no" action="start"/>
<junit printsummary="yes" haltonfailure="false" fork="yes">
<classpath refid="test.classpath"/>
<formatter type="xml"/>
<batchtest fork="yes" todir="${}/test-out">
<fileset dir="${test.home}">
<include name="**/*"/>
<exclude name="**/*"/>
<junitreport todir="${}">
<fileset dir="${}/test-out">
<include name="TEST-*.xml"/>
<record name="${}/test-output.txt" action="stop"/>
The code snippet will generate the XML reports for each test case, and the reports will be captured to '$\{\}' directory.

{note:title=About haltonfailure}
If 'haltonfailure' in junit task is defined to true, the junit reports are not complete. If you want to generate the full reports, set 'haltonfailure' to false.

h2. Publish JUnit Report
Add _*Publish JUnit Report*_ step to your build workflow. If you have several report sets, you can add several publish JUnit steps with different report set names. Reference [this page|Publish Build Reports] for more details.