ReportNG HTML XML Reporting Plug in for TestNG
ReportNG HTML XML Reporting Plug in for TestNG
ReportNG is a simple HTML reporting plug-in for the TestNG unit-testing framework. It is intended as a replacement for the default TestNG HTML report. The default report is comprehensive but is not so easy to understand at-a-glance. ReportNG provides a simple, colour-coded view of the test results.
Disable the Default Listeners first
Project (right-click) > Properties > TestNG > Tick �Disable default listeners� > Apply > ok
The reportng-1.1.3.jar and velocity-dep-1.4.jar files must be included in the classpath to run the tests.
Download ReportNG (jar) files
Download reportng.jar
Download velocity.jar
Check your project .classpath after build configure;
<classpathentry kind="lib" path="lib/velocity-dep-1.x.jar"/>
<classpathentry kind="lib" path="lib/testng-6.x.jar"/>
<classpathentry kind="lib" path="lib/reportng-1.1.x.jar"/>
Create the xml file by copying the below code:
Right-click your Project/Class file > TestNG > "Convert to TestNG" > Edit the xml code by adding LISTENERS given below > Finish
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<listeners>
<listener class-name="org.uncommons.reportng.HTMLReporter"/>
<listener class-name="org.uncommons.reportng.JUnitXMLReporter"/>
</listeners>
<test name="Test">
<classes>
<class name="package.classname"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
Now run the TestNG framework by right clicking the .xml file from eclipse
Sample Report1 ReportNG

