ExtentReports V4 has been released and it is more beautiful and interactive. In this post we will discuss about generating the reports using Extentreports V4 in Selenium with TestNG.
Step 1: Create a Maven project and add the required dependencies in the pom.xml file as shown below
Step 2: Create a base class, where we will initialize the ExtentReports and configure extent report with the theme and title. Also add system information as shown below
In the BaseClass.java we have instantiated and configured the ExtentReports in the @BeforeClass method so that it will be executed once before executing all the demo tests.
And in @AfterClass method we are closing the extent report, this method will be executed after executing all the demo tests.
Step 3: Create a demo tests class and write some test case, in the below example we wrote 4 test cases (2 Pass, 1 Fail, 1 Skip)
Execute the test cases and open the ExtentReports.html file, which is defined BaseClass.java. The results should be looking as below
Results View:
Dashboard View:
System Info:
Thanks for reading. #HappyLearning #HappyTesting
Step 1: Create a Maven project and add the required dependencies in the pom.xml file as shown below
Step 2: Create a base class, where we will initialize the ExtentReports and configure extent report with the theme and title. Also add system information as shown below
In the BaseClass.java we have instantiated and configured the ExtentReports in the @BeforeClass method so that it will be executed once before executing all the demo tests.
And in @AfterClass method we are closing the extent report, this method will be executed after executing all the demo tests.
Step 3: Create a demo tests class and write some test case, in the below example we wrote 4 test cases (2 Pass, 1 Fail, 1 Skip)
Execute the test cases and open the ExtentReports.html file, which is defined BaseClass.java. The results should be looking as below
Results View:
Dashboard View:
System Info:
Thanks for reading. #HappyLearning #HappyTesting
Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. investire alle canarie con rendita garantita
ReplyDelete