TestNG Getting Started note [6]:testng-xslt Beautification test Report

Source: Internet
Author: User
Tags xsl xslt testng
After testing with testng, the HTML test report is automatically generated. The TESTNG-XSLT can be used to rewrite the test report.
Test-out/index.html

1. Download Testng-xslt and unzip on the official websiteLink:http://testng-xslt.googlecode.com/files/testng-xslt-1.1.2.zip

2. Copying FilesCopy the Saxon-8.7.jar and Saxonliason.jar under the Lib file to the project's Lib folder (if not new) and import it into the project/src/main/resources/testng-results.xsl To the project's Testout folder (if none is new)


4. Add Target to Build.xml{Name}: is the name of the project, {in} and {style}: corresponding to the XML and XSL that testng generated the report; {out}: is the file name and path to generate the report with TESTNG-XSLT; {expression} : is the path to generate the report with TESTNG-XSLT;
<path id= "Test.classpath" > <fileset dir= "${libdir}" includes= "*.jar"/> </path> <target name= " Testoutput "depends=" Runtest "> <xslt in=" ${testng.output.dir}/testng-results.xml "style=" ${testng.output.dir }/testng-results.xsl "out=" ${testng.output.dir}/index1.html "> <param name=" Testngxslt.outputdir "expression= "${basedir}/test-output/"/> <param name= "Testngxslt.showruntimetotals" expression= "true"/> <classpath Refid= "Test.classpath"/> </xslt> </target>
5. After running Build.xml, you can see the report after beautification .Test-out/index1.html


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.