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
It's a great post! you have done a great job!!
ReplyDeleteNode JS Training in Chennai
Node JS Training Institute in chennai
Blockchain course
Big Data Analytics Courses in Chennai
Xamarin Training
Informatica Training in Chennai
Ionic Training in Chennai
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
ReplyDeleteGreat Article. Thank you for sharing! Really an awesome post for every one.
ReplyDeleteIEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.
JavaScript Training in Chennai
JavaScript Training in Chennai