From 753a6c60f47f3ac4f270005b65e9d6481de8eb68 Mon Sep 17 00:00:00 2001 From: Ashlee Young Date: Fri, 23 Oct 2015 10:00:02 -0700 Subject: Adding maven and ant source trees Change-Id: I0a39b9add833a31b9c3f98d193983ae2f3a5a445 Signed-off-by: Ashlee Young --- .../apache-ant-1.9.6/manual/Tasks/junitreport.html | 214 +++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 framework/src/ant/apache-ant-1.9.6/manual/Tasks/junitreport.html (limited to 'framework/src/ant/apache-ant-1.9.6/manual/Tasks/junitreport.html') diff --git a/framework/src/ant/apache-ant-1.9.6/manual/Tasks/junitreport.html b/framework/src/ant/apache-ant-1.9.6/manual/Tasks/junitreport.html new file mode 100644 index 00000000..365920b2 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/manual/Tasks/junitreport.html @@ -0,0 +1,214 @@ + + + + +JUnitReport Task + + + + +

JUnitReport

+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. +

Note: This task depends on external libraries not included in +the Apache Ant distribution. See +Library Dependencies for more information.

+ +

Requirements

+ +

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. +

+ + + + + +
XalanSun JDK BundleStatus
2.4.1+JDK 1.4.2-01+OK
XSLTCJDK 1.5.xOK
2.xJDK 1.4.xDEPRECATED
Use ${ant.home}/etc/junit-frames-xalan1.xsl +
Upgrade Xalan using the JDK endorsement mechanism
+ +

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.

+

With Ant 1.7 we had to drop support Xalan-J 1, since Xalan-J 1 has not +available anymore for quite some time.

+ +

Parameters

+ + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
tofileThe name of the XML file that will aggregate all individual + XML testsuite previously generated by the JUnit task.No. Default to TESTS-TestSuites.xml
todirThe directory where should be written the file resulting + from the individual XML testsuite aggregation.No. Default to current directory
+

Nested Elements

+

fileset

+

junitreport collects individual xml files generated by the JUnit +task using the nested <FileSet> +element.

+

report

+

Generate a browsable report based on the document created by the merge.

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
formatThe format of the generated report. Must be "noframes" + or "frames".No, default to "frames"
styledirThe directory where the stylesheets are defined. They must + be conforming to the following conventions: +
    +
  • frames format: the stylesheet must be named junit-frames.xsl.
  • +
  • noframes format: the stylesheet must be named junit-noframes.xsl.
  • +
+
No. Default to embedded stylesheets.
todirThe directory where the files resulting from the + transformation should be written to.No. Default to current directory
+

Ant assumes the following concerning the frames and noframes formats :

+

The frames format uses +a stylesheet which is generating output only by redirecting.

+

The +noframes format does not use redirecting and generates one +file called junit-noframes.html.

+

Custom versions of junit-frames.xsl or junit-noframes.xsl must adhere to the above conventions.

+ +

Nested Element of the report tag

+

param

+Since Ant 1.7the report tag supports nested param tags. +These tags can pass XSL parameters to the stylesheet. +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
nameName of the XSL parameterYes
expressionText value to be placed into the param.
+ Was originally intended to be an XSL expression.
Yes
ifThe param will only be passed if this property is set.No
unlessThe param will not be passed if this property is set.No
+ +

The built-in stylesheets support the following parameters:

+ + + + + + + + + + + +
XSL-ParameterDescriptionRequired
TITLETitle used in <title> and <h1> tagsNo. Defaults to Unit Test Results.
+ +

classpath

+

Since Ant 1.9.5. +Like for the XSLT task, +a nested <classpath> will be used to load the processor.

+ +

factory

+

Since Ant 1.9.5. +Like for the XSLT task, +a nested <factory> can be used to specify factory settings.

+ + +

Example of report

+
+
<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.

+

Example of report with xsl params

+
+
+<junitreport todir="${outputdir}">
+    <fileset dir="${jrdir}">
+        <include name="TEST-*.xml"/>
+    </fileset>
+    <report todir="${outputdir}/html"
+        styledir="junitreport"
+        format="frames">
+        <param name="key1" expression="value1"/>
+        <param name="key2" expression="value2"/>
+    </report>
+</junitreport>
+  
+
+

This example requires a file called junitreport/junit-frames.xsl. + The XSL parameters key1 and key2 will be passed to the XSL transformation.

+ + + + -- cgit 1.2.3-korg