Report Generation in Selenium Webdriver using TestNG

| | 1 min read

TestNG is a tool that is used to perform unit testing. Mostly TestNG is often used to perform unit testing by developers as well as for Automation testing by software testers to view the test run results in a report.

TestNG reports are very useful to analyze the Automation Run status. Selenium is used to automate any web application but it cannot generate automation run reports. We need to use third-party tools like TestNG to generate automation reports.

It is not required to add any additional code to generate the report using TestNG. We can view the report by refreshing the project folder after running the test.

Steps to add TestNG to Eclipse:

  1. Download the jar file for TestNG
  2. Add the jar file to the project created in Eclipse
  3. Import TestNG annotations
  4. To run the project using TestNG right-click on the project and select Run as TestNG