Ant build using TestNG-XSLT

By xngo on July 12, 2019

<!-- 
  Example for TestNG-XSLT
    Run this target only after TestNG had generated the xml resutl file
        (i.e. testng_output/testng-results.xml).
    Change TestNG-XSLT stylesheet path accordingly
        (i.e. lib/testng-xslt-0.6.2/src/main/resources/testng-results.xsl).
-->
<target name="testng_nice_report">
  <mkdir dir="testng_nice_report"/>
  <xslt in="testng_output/testng-results.xml" 
        style="lib/testng-xslt-0.6.2/src/main/resources/testng-results.xsl"
        out="testng_nice_report/index.html">
    <param name="testNgXslt.outputDir" expression="${basedir}/testng_nice_report"/>
    <param name="testNgXslt.showRuntimeTotals" expression="true"/>
    <classpath refid="MyClasspath"/>
  </xslt>
</target>

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.