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 5.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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>You need&nbsp; <a href="http://xml.apache.org/xalan/">Xalan 1</a> to use this
  12. task or use the Xalan1 compatibility jar of <a href="http://xml.apache.org/xalan-j/">Xalan2</a>.</p>
  13. <h3>Parameters</h3>
  14. <table border="1" cellpadding="2" cellspacing="0">
  15. <tr>
  16. <td width="12%" valign="top"><b>Attribute</b></td>
  17. <td width="78%" valign="top"><b>Description</b></td>
  18. <td width="10%" valign="top"><b>Required</b></td>
  19. </tr>
  20. <tr>
  21. <td valign="top">tofile</td>
  22. <td valign="top">The name of the XML file that will aggregate all individual
  23. XML testsuite previously generated by the JUnit task.</td>
  24. <td align="center" valign="top">No. Default to TESTS-TestSuites.xml</td>
  25. </tr>
  26. <tr>
  27. <td valign="top">todir</td>
  28. <td valign="top">The directory where should be written the file resulting
  29. from the individual XML testsuite aggregation.</td>
  30. <td align="center" valign="top">No. Default to current directory</td>
  31. </tr>
  32. </table>
  33. <h3><a name="nested">Nested Elements</a></h3>
  34. <h4>fileset</h4>
  35. <p><code>junitreport</code> collects individual xml files generated by the JUnit
  36. task using the nested <a href="index.html#fileset"><code>&lt;FileSet&gt;</code></a>
  37. element.</p>
  38. <h4>report</h4>
  39. <p>Generate a browsable report based on the document created by the merge.</p>
  40. <h3>Parameters</h3>
  41. <table border="1" cellpadding="2" cellspacing="0">
  42. <tr>
  43. <td width="12%" valign="top"><b>Attribute</b></td>
  44. <td width="78%" valign="top"><b>Description</b></td>
  45. <td width="10%" valign="top"><b>Required</b></td>
  46. </tr>
  47. <tr>
  48. <td valign="top">format</td>
  49. <td valign="top">The format of the generated report. Must be &quot;noframes&quot;
  50. or &quot;frames&quot;.</td>
  51. <td align="center" valign="top">No, default to &quot;frames&quot;</td>
  52. </tr>
  53. <tr>
  54. <td valign="top">styledir</td>
  55. <td valign="top">The directory where the stylesheets are defined. They must
  56. be conforming to the following conventions:
  57. <p>For the noframes format, only the stylesheet overview-summary.xsl is
  58. used.</p>
  59. <p>For the frames format, the result will be javadoc-like. List of package
  60. will be in top left frame, the list of classes in bottom left frame and
  61. the details/summary in the main window.&nbsp; It uses the following XSLs:</p>
  62. <ul>
  63. <li><tt>all-packages.xsl</tt> - creates an <i>all-packages.html</i> file that
  64. contains the list of all packages (top-left frame) with links to their
  65. corresponding <i>package-summary.html</i> files in their respective
  66. location (package name matches path name)</li>
  67. <li><tt>all-classes.xsl</tt> - creates an <i> all-classes.html</i> file that contains the
  68. whole list of classes in all packages with links to their
  69. corresponding <i>&lt;classname&gt;-details.html</i> in their
  70. respective package directory.</li>
  71. <li><tt>overview-packages.xsl</tt> - creates an <i>overview-packages.html</i>
  72. that makes a summary of all packages and classes not belonging to a
  73. package.</li>
  74. <li><tt>class-details.xsl</tt> - creates a detailed page about the testcases of a
  75. testsuite. This this xsl will be applied on all testsuites and written
  76. to the <i>&lt;classname&gt;-details.html</i> file located in their
  77. respective package directory. </li>
  78. <li><tt>package-summary.xsl</tt> - create a testsuite summary for a package. This
  79. will be written to <i> package-summary.html</i> in its corresponding package
  80. directory. </li>
  81. <li><tt>classes-list.xsl</tt> - creates the list of classes belonging to a
  82. specific package. This will be written to classes-list.html&nbsp; in
  83. its corresponding package directory.</li>
  84. </ul>
  85. </td>
  86. <td align="center" valign="top">No. Default to embedded stylesheets.</td>
  87. </tr>
  88. <tr>
  89. <td valign="top">todir</td>
  90. <td valign="top">The directory where the files resulting from the
  91. transformation should be written to.</td>
  92. <td align="center" valign="top">No. Default to current directory</td>
  93. </tr>
  94. <tr>
  95. <td valign="top">extension</td>
  96. <td valign="top">The extension of the generated files, they must include the
  97. dot (ex: .html)</td>
  98. <td align="center" valign="top">No. Default to .html</td>
  99. </tr>
  100. </table>
  101. <h3>Example of report</h3>
  102. <blockquote>
  103. <pre>&lt;junitreport todir=&quot;./reports&quot;&gt;
  104. &lt;fileset dir=&quot;./reports&quot;&gt;
  105. &lt;include name=&quot;TEST-*.xml&quot;/&gt;
  106. &lt;/fileset&gt;
  107. &lt;report format=&quot;frames&quot; todir=&quot;./report/html&quot;/&gt;
  108. &lt;/junitreport&gt;
  109. </pre>
  110. </blockquote>
  111. <p>would generate a <tt>TESTS-TestSuites.xml</tt> file in the directory <tt>reports</tt> and
  112. generate the default framed report in the directory <tt>report/html</tt>.</p>
  113. </body>
  114. </html>