REPORTNG is a simple framework testng the unit test framework that replaces the default testng HTML report to generate HTML report. You can also use the TESTNG listener to freely configure HTML report.
STEP1: Add the following jar package to your own project
Reportng-1.1.4.jar
Velocity-dep-1.4.jar
Guice-3.0.jar
Schemas such as:
STEP2: For reportng to take effect, we need to disable the default testng listener
1. Enter Eclipse,windows->properties
2. Click testng
3. Select Disable Default listeners, and enter Org.uncommons.reportng.HTMLReporter to pre Defined listeners
4. Click OK to make the changes effective
Step 3: We need to add the following 2 listeners to the Testng.xml file
< Listeners > < class-name= "Org.uncommons.reportng.HTMLReporter"/> < class-name= "Org.uncommons.reportng.JUnitXMLReporter"/>< /listeners>
STEP4: Click testng to run our unit test
After the run, we can find our running results under the test-output->html file.
View Test Results
Configuring reportng for testng