Selenium html reporting – Extent with testNG – Part1

Extent report is one of the flexible API so far, and they have community version as well, so with free of cost you can use with your existing framework.

In this post, we will see how we can do the setup extent reporting and integrate with existing framework. and also will see how to fit into a testNG classes.




 

Maven dependency

Add following dependency to the pom.xml

 

For basic example and official documentation,  refer

http://extentreports.com/docs/versions/3/java/

 

Watch the demo here

 

Folder structure

extentReport
— — TestSample.java
— — ExtentManager.java
— — TestSampleExtent.java

 

Code samples

TestSample.java

 

ExtentManager.java

 

TestSampleExtent.java

 

testng.xml

 

Run this testng.xml to run the testcase and generate the html report.

Hope this helps!

Share with friends…

Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our facebook:qavalidation.com, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *