|
- <html>
- <head>
- <title>JUnitReport</title>
- </head>
-
- <body>
-
- <h2><a name="junitreport">JUnitReport</a></h2>
- Merge the individual XML files generated by the JUnit task and eventually apply
- a stylesheet on the resulting merged document to provide a browsable report of
- the testcases results.
- <h3>Requirements</h3>
- <p>You need <a href="http://xml.apache.org/xalan/">Xalan 1</a> to use this
- task or use the Xalan1 compatibility jar of <a href="http://xml.apache.org/xalan-j/">Xalan2</a>.</p>
- <h3>Parameters</h3>
- <table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td width="12%" valign="top"><b>Attribute</b></td>
- <td width="78%" valign="top"><b>Description</b></td>
- <td width="10%" valign="top"><b>Required</b></td>
- </tr>
- <tr>
- <td valign="top">tofile</td>
- <td valign="top">The name of the XML file that will aggregate all individual
- XML testsuite previously generated by the JUnit task.</td>
- <td align="center" valign="top">No. Default to TESTS-TestSuites.xml</td>
- </tr>
- <tr>
- <td valign="top">todir</td>
- <td valign="top">The directory where should be written the file resulting
- from the individual XML testsuite aggregation.</td>
- <td align="center" valign="top">No. Default to current directory</td>
- </tr>
- </table>
- <h3><a name="nested">Nested Elements</a></h3>
- <h4>fileset</h4>
- <p><code>junitreport</code> collects individual xml files generated by the JUnit
- task using the nested <a href="index.html#fileset"><code><FileSet></code></a>
- element.</p>
- <h4>report</h4>
- <p>Generate a browsable report based on the document created by the merge.</p>
- <h3>Parameters</h3>
- <table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td width="12%" valign="top"><b>Attribute</b></td>
- <td width="78%" valign="top"><b>Description</b></td>
- <td width="10%" valign="top"><b>Required</b></td>
- </tr>
- <tr>
- <td valign="top">format</td>
- <td valign="top">The format of the generated report. Must be "noframes"
- or "frames".</td>
- <td align="center" valign="top">No, default to "frames"</td>
- </tr>
- <tr>
- <td valign="top">styledir</td>
- <td valign="top">The directory where the stylesheets are defined. They must
- be conforming to the following conventions:
- <p>For the noframes format, only the stylesheet overview-summary.xsl is
- used.</p>
- <p>For the frames format, the result will be javadoc-like. List of package
- will be in top left frame, the list of classes in bottom left frame and
- the details/summary in the main window. It uses the following XSLs:</p>
- <ul>
- <li><tt>all-packages.xsl</tt> - creates an <i>all-packages.html</i> file that
- contains the list of all packages (top-left frame) with links to their
- corresponding <i>package-summary.html</i> files in their respective
- location (package name matches path name)</li>
- <li><tt>all-classes.xsl</tt> - creates an <i> all-classes.html</i> file that contains the
- whole list of classes in all packages with links to their
- corresponding <i><classname>-details.html</i> in their
- respective package directory.</li>
- <li><tt>overview-packages.xsl</tt> - creates an <i>overview-packages.html</i>
- that makes a summary of all packages and classes not belonging to a
- package.</li>
- <li><tt>class-details.xsl</tt> - creates a detailed page about the testcases of a
- testsuite. This this xsl will be applied on all testsuites and written
- to the <i><classname>-details.html</i> file located in their
- respective package directory. </li>
- <li><tt>package-summary.xsl</tt> - create a testsuite summary for a package. This
- will be written to <i> package-summary.html</i> in its corresponding package
- directory. </li>
- <li><tt>classes-list.xsl</tt> - creates the list of classes belonging to a
- specific package. This will be written to classes-list.html in
- its corresponding package directory.</li>
- </ul>
- </td>
- <td align="center" valign="top">No. Default to embedded stylesheets.</td>
- </tr>
- <tr>
- <td valign="top">todir</td>
- <td valign="top">The directory where the files resulting from the
- transformation should be written to.</td>
- <td align="center" valign="top">No. Default to current directory</td>
- </tr>
- <tr>
- <td valign="top">extension</td>
- <td valign="top">The extension of the generated files, they must include the
- dot (ex: .html)</td>
- <td align="center" valign="top">No. Default to .html</td>
- </tr>
- </table>
- <h3>Example of report</h3>
- <blockquote>
- <pre><junitreport todir="./reports">
- <fileset dir="./reports">
- <include name="TEST-*.xml"/>
- </fileset>
- <report format="frames" todir="./report/html"/>
- </junitreport>
- </pre>
- </blockquote>
- <p>would generate a <tt>TESTS-TestSuites.xml</tt> file in the directory <tt>reports</tt> and
- generate the default framed report in the directory <tt>report/html</tt>.</p>
-
- </body>
-
- </html>
|