Note: This task depends on external libraries not included in the Ant distribution. See Library Dependencies for more information.
The task needs Apache Xalan 2.4.1+ or Xalan XSLTC (JDK 1.4 contains a version of Xalan-J 2.x while JDK 1.5 ships with a version of XSLTC). Starting from JDK 1.4.2-01 it ships with a bundled Xalan-J 2.4.1+, meaning that JDK version prior to 1.4.2-01 won't work out of the box. The table below summarize the compatibility status.
Xalan | Sun JDK Bundle | Status | |
---|---|---|---|
2.4.1+ | JDK 1.4.2-01+ | OK | |
XSLTC | JDK 1.5.x | OK | |
2.x | JDK 1.4.x | DEPRECATED Use ${ant.home}/etc/junit-frames-xalan1.xsl Upgrade Xalan using the JDK endorsement mechanism | |
1.2 | N/A | DEPRECATED Use ${ant.home}/etc/junit-frames-xalan1.xsl |
With Ant 1.6.2 we had to decide between supporting Xalan-J 1/Xalan J 2.4.1- and Xalan 2.4.1+/XSLTC, since there was no way to support both couples at the same time.
Attribute | Description | Required |
tofile | The name of the XML file that will aggregate all individual XML testsuite previously generated by the JUnit task. | No. Default to TESTS-TestSuites.xml |
todir | The directory where should be written the file resulting from the individual XML testsuite aggregation. | No. Default to current directory |
junitreport
collects individual xml files generated by the JUnit
task using the nested <FileSet>
element.
Generate a browsable report based on the document created by the merge.
Attribute | Description | Required |
format | The format of the generated report. Must be "noframes" or "frames". | No, default to "frames" |
styledir | The directory where the stylesheets are defined. They must
be conforming to the following conventions:
|
No. Default to embedded stylesheets. |
todir | The directory where the files resulting from the transformation should be written to. | No. Default to current directory |
<junitreport todir="./reports"> <fileset dir="./reports"> <include name="TEST-*.xml"/> </fileset> <report format="frames" todir="./report/html"/> </junitreport>
would generate a TESTS-TestSuites.xml file in the directory reports and generate the default framed report in the directory report/html.
Copyright © 2001-2002,2004-2005 The Apache Software Foundation. All rights Reserved.