You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

junitreport.html 3.6 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <html>
  2. <head>
  3. <title>JUnitReport</title>
  4. </head>
  5. <body>
  6. <h2><a name="junitreport">JUnitReport</a></h2>
  7. Merge the individual XML files generated by the JUnit task and eventually apply
  8. a stylesheet on the resulting merged document to provide a browsable report of
  9. the testcases results.
  10. <h3>Requirements</h3>
  11. <p>The task will run with either <a href="http://xml.apache.org/xalan-j/">Xalan 2.x</a>
  12. or <a href="http://xml.apache.org/dist/xalan-j/old/xalan-j_1_2_2.zip">Xalan 1.2.2</a>.</p>
  13. <p>
  14. Note:<i>For a framed format Xalan 1.2.2 will need Xerces(xerces.jar) as well as BSF(bsf.jar)
  15. that can be found in the distribution archive. Xerces will need to be before any other
  16. parser (such as the shipped crimson). It is *highly* recommended to use Xalan2 instead
  17. because Xalan1 is no more supported.
  18. </i></p>
  19. <h3>Parameters</h3>
  20. <table border="1" cellpadding="2" cellspacing="0">
  21. <tr>
  22. <td width="12%" valign="top"><b>Attribute</b></td>
  23. <td width="78%" valign="top"><b>Description</b></td>
  24. <td width="10%" valign="top"><b>Required</b></td>
  25. </tr>
  26. <tr>
  27. <td valign="top">tofile</td>
  28. <td valign="top">The name of the XML file that will aggregate all individual
  29. XML testsuite previously generated by the JUnit task.</td>
  30. <td align="center" valign="top">No. Default to TESTS-TestSuites.xml</td>
  31. </tr>
  32. <tr>
  33. <td valign="top">todir</td>
  34. <td valign="top">The directory where should be written the file resulting
  35. from the individual XML testsuite aggregation.</td>
  36. <td align="center" valign="top">No. Default to current directory</td>
  37. </tr>
  38. </table>
  39. <h3><a name="nested">Nested Elements</a></h3>
  40. <h4>fileset</h4>
  41. <p><code>junitreport</code> collects individual xml files generated by the JUnit
  42. task using the nested <a href="../CoreTypes/fileset.html"><code>&lt;FileSet&gt;</code></a>
  43. element.</p>
  44. <h4>report</h4>
  45. <p>Generate a browsable report based on the document created by the merge.</p>
  46. <h3>Parameters</h3>
  47. <table border="1" cellpadding="2" cellspacing="0">
  48. <tr>
  49. <td width="12%" valign="top"><b>Attribute</b></td>
  50. <td width="78%" valign="top"><b>Description</b></td>
  51. <td width="10%" valign="top"><b>Required</b></td>
  52. </tr>
  53. <tr>
  54. <td valign="top">format</td>
  55. <td valign="top">The format of the generated report. Must be &quot;noframes&quot;
  56. or &quot;frames&quot;.</td>
  57. <td align="center" valign="top">No, default to &quot;frames&quot;</td>
  58. </tr>
  59. <tr>
  60. <td valign="top">styledir</td>
  61. <td valign="top">The directory where the stylesheets are defined. They must
  62. be conforming to the following conventions:
  63. <ul>
  64. <li>frames format: the stylesheet must be named <i>junit-frames.xsl</i>.</li>
  65. <li>noframes format: the stylesheet must be named <i>junit-noframes.xsl</i>.</li>
  66. </ul>
  67. </td>
  68. <td align="center" valign="top">No. Default to embedded stylesheets.</td>
  69. </tr>
  70. <tr>
  71. <td valign="top">todir</td>
  72. <td valign="top">The directory where the files resulting from the
  73. transformation should be written to.</td>
  74. <td align="center" valign="top">No. Default to current directory</td>
  75. </tr>
  76. </table>
  77. <h3>Example of report</h3>
  78. <blockquote>
  79. <pre>&lt;junitreport todir=&quot;./reports&quot;&gt;
  80. &lt;fileset dir=&quot;./reports&quot;&gt;
  81. &lt;include name=&quot;TEST-*.xml&quot;/&gt;
  82. &lt;/fileset&gt;
  83. &lt;report format=&quot;frames&quot; todir=&quot;./report/html&quot;/&gt;
  84. &lt;/junitreport&gt;
  85. </pre>
  86. </blockquote>
  87. <p>would generate a <tt>TESTS-TestSuites.xml</tt> file in the directory <tt>reports</tt> and
  88. generate the default framed report in the directory <tt>report/html</tt>.</p>
  89. </body>
  90. </html>