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.4 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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>.
  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.</i>
  16. <h3>Parameters</h3>
  17. <table border="1" cellpadding="2" cellspacing="0">
  18. <tr>
  19. <td width="12%" valign="top"><b>Attribute</b></td>
  20. <td width="78%" valign="top"><b>Description</b></td>
  21. <td width="10%" valign="top"><b>Required</b></td>
  22. </tr>
  23. <tr>
  24. <td valign="top">tofile</td>
  25. <td valign="top">The name of the XML file that will aggregate all individual
  26. XML testsuite previously generated by the JUnit task.</td>
  27. <td align="center" valign="top">No. Default to TESTS-TestSuites.xml</td>
  28. </tr>
  29. <tr>
  30. <td valign="top">todir</td>
  31. <td valign="top">The directory where should be written the file resulting
  32. from the individual XML testsuite aggregation.</td>
  33. <td align="center" valign="top">No. Default to current directory</td>
  34. </tr>
  35. </table>
  36. <h3><a name="nested">Nested Elements</a></h3>
  37. <h4>fileset</h4>
  38. <p><code>junitreport</code> collects individual xml files generated by the JUnit
  39. task using the nested <a href="index.html#fileset"><code>&lt;FileSet&gt;</code></a>
  40. element.</p>
  41. <h4>report</h4>
  42. <p>Generate a browsable report based on the document created by the merge.</p>
  43. <h3>Parameters</h3>
  44. <table border="1" cellpadding="2" cellspacing="0">
  45. <tr>
  46. <td width="12%" valign="top"><b>Attribute</b></td>
  47. <td width="78%" valign="top"><b>Description</b></td>
  48. <td width="10%" valign="top"><b>Required</b></td>
  49. </tr>
  50. <tr>
  51. <td valign="top">format</td>
  52. <td valign="top">The format of the generated report. Must be &quot;noframes&quot;
  53. or &quot;frames&quot;.</td>
  54. <td align="center" valign="top">No, default to &quot;frames&quot;</td>
  55. </tr>
  56. <tr>
  57. <td valign="top">styledir</td>
  58. <td valign="top">The directory where the stylesheets are defined. They must
  59. be conforming to the following conventions:
  60. <ul>
  61. <li>frames format: the stylesheet must be named <i>junit-frames.xsl</i>.</li>
  62. <li>noframes format: the stylesheet must be named <i>junit-noframes.xsl</i>.</li>
  63. </ul>
  64. </td>
  65. <td align="center" valign="top">No. Default to embedded stylesheets.</td>
  66. </tr>
  67. <tr>
  68. <td valign="top">todir</td>
  69. <td valign="top">The directory where the files resulting from the
  70. transformation should be written to.</td>
  71. <td align="center" valign="top">No. Default to current directory</td>
  72. </tr>
  73. </table>
  74. <h3>Example of report</h3>
  75. <blockquote>
  76. <pre>&lt;junitreport todir=&quot;./reports&quot;&gt;
  77. &lt;fileset dir=&quot;./reports&quot;&gt;
  78. &lt;include name=&quot;TEST-*.xml&quot;/&gt;
  79. &lt;/fileset&gt;
  80. &lt;report format=&quot;frames&quot; todir=&quot;./report/html&quot;/&gt;
  81. &lt;/junitreport&gt;
  82. </pre>
  83. </blockquote>
  84. <p>would generate a <tt>TESTS-TestSuites.xml</tt> file in the directory <tt>reports</tt> and
  85. generate the default framed report in the directory <tt>report/html</tt>.</p>
  86. </body>
  87. </html>