Thursday, June 20, 2013

Ant task for generating XSLT report

Once you are executed the test by TestNG or TestNG with Group, you can invoke the following ant target to generate xslt report.
 

 
 
  
   
   
  
 
Note: To work this above code you should have the following 2 jars in your class path:
SaxonLiaison.jar and saxon-8.7.jar 
In my example i have used a custom style which is specified in the "xslt_style/testng-results.xsl" file. After executing this target you will find your xslt report in "index.html" file which is in the "reports.xslt" directory specified in the ant property.

The report generated by testng with xslt looks something like the below image:


No comments:

Post a Comment