TestNG Reporting in Selenium Webdriver


TestNG Reporting

TestNG trials framework inspired from JUnit and NUnit. It introducing new functionalities that make it better and easier to use TestNG Reporting in Selenium Webdriver.

TestNG Reporting in Selenium Webdriver

In simple words, TestNG is an instrument that helps us to arrange the exams and help us to produce the test records. TestNG construction utilized for automation assessment with Selenium.

TestNG Advantages

  • Many built-in Annotations that happen to be easier to use and understand
  • Test method can be dependent on another method
  • Test circumstances Grouped and execute by groups
  • Parallel evaluation is possible
  • TestNG has built in HTML report and XML article generation facility. It has additionally built-in logging facility

How to use it...

1) The first step is to set up TestNG. It is easy to install TestNG, as it comes as a plugin for Eclipse IDE. 2) Make a 'New class' by right go through the 'automationFramework' bundle. then select TestNG > Make a TestNG Class and name it as TestNG_Platform. 3) Let's take the prior Log4j_Logging_TC test case and separate the test case into three parts. @BeforeMethod : Configure Log4j XML, Open up Excel sheet, Kick off Firefox and immediate it to the bottom URL @Test: Execute SIgnIn action and Log out @AfterMethod : Close Firefox browser

TestNG Test

4) Run the test by right go through the test case script and choose Run As > TestNG Test. 5) it few minutes to complete the execution, completed the results in the Console window. 6) Click on the Results of TestNG tabs. It screens the total handed down, failed and skipped test with the time taken during the execution. It exhibited 'transferred: 1'. This means test is successful and Passed. It discovers 3 sub tabs. "All Tests", "Failed Lab tests" and "Summary". click "All

Default Test

7) TestNG also produce HTML information. To gain access to those accounts go to your Project folder and wide open test-output folder. 8) Open up 'emailable-report.html', as this is an HTML survey open up it with a web browser. 9) TestNG also produce 'index.html' survey and it resides in the same test-output folder. This review gives the connect to all the several elements of the TestNG information. like Groupings & Reporter End result. On clicking these will display detailed information of execution. In the advanced section of TestNG, we will go through each of the TestNG topics.