Extent Report Version 4 Selenium With TestNG


Extent Report Version 4 Selenium With TestNG

As we all are aware reporting is an integral and very important part of any testing automation framework. Normally in any testing framework, we use either default TestNg Report, Allure Report or most widely used as Extent Report. We already have seen in my other blogs how we can set up an extent report in TestNg and Cucumber.

In this blog we are going to learn how to set up this newly introduced extent report Version 4 in Selenium along with TestNG.

To Setup Extent Report Version 4 in our automation framework we need to follow below steps:



1)     Download Extent report maven dependency or Jar from maven repository using this link.
In this blog for demo purposes, I would be using below maven dependency.



2)    In the below code I have written two test cases to validate Tittle and logo on Google home page. Also captured screenshot in case of any failure in Test Case. Comments are also added along with code for better understanding.

Result of code execution would be :







SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
Anonymous
January 8, 2019 at 3:21 PM

as per your TC2 validation. 'ImagePresentNo' should get failed in the validation because of getting true flag. But in extent report it get highlighted as PASS log report. Could you clarify. Thanks

Reply
avatar
January 8, 2019 at 3:28 PM

Hi in TC 2,if you observe i have created 2 nodes first one with image(true) which actually got passed,other one with image(false) which got failed.Though that failure its not visible in the screenshot i shared in the blog :)

Reply
avatar
Anonymous
January 8, 2019 at 6:38 PM

Thanks for your reply. yes it should fail. I meant ImagePresentNo node highlighted as Green with PASS tag. That's my concern.

Reply
avatar
January 10, 2019 at 4:42 PM

Hi,
I am working on the same code,for working fine as mentioned in above,but report only created and but screenshots are creating.may i know what is the issue i am facing in my code.using same code whatever u mentioned above.

Reply
avatar
January 11, 2019 at 12:48 PM

Hi Vishnu,
Sorry but i am not clear with your question.Request you to please share your detailed question along with Screenshot on my email id: ankur.jain.cs@gmail.com.Surely i would reply back to you :)

Reply
avatar
Gautam
May 16, 2019 at 3:09 PM

How to differentiate test cases based on module name.. I want to generate report Module wise testcases

Reply
avatar
November 13, 2019 at 11:16 PM

How to add extent-config.xml file in this extent report code for adding the customize logo?

Reply
avatar
February 17, 2020 at 10:39 AM

Hi
If I want to run the test class from testng.xml what changes I need to do can you please help me in that

Reply
avatar
Anonymous
February 21, 2020 at 10:21 AM

Hi,
I want to print test steps in the console, how to achieve this can you help me out.

Reply
avatar
June 27, 2020 at 4:16 AM

Hello,
Thank you for the tutorial. When I tried this code it is working fine , but when I tried to create a utility extent class and call in page classes in pom framework , test=extent.create("String name ") is throwing nullpointer exception . Can you please help me out?



Reply
avatar
September 16, 2020 at 7:57 PM

how will you get total steps executed in all nodes ?

Reply
avatar