Report Generation in Selenium Webdriver using TestNG
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:
- Download the jar file for TestNG
- Add the jar file to the project created in Eclipse
- Import TestNG annotations
- To run the project using TestNG right-click on the project and select Run as TestNG