Extent Reports Selenium Version 4 – Software Testing Material

Earlier we posted “How To Generate Extent Reports Selenium” and “Generating Extent Reports Selenium with Screenshots“. This post will guide you on “How To Generate Extent Reports Version 4 in Selenium”. Check this if you have any issues with Extent Reports version 3.

Extent Reports Selenium Version 4

We all know Extent reports are the advanced Selenium Reporting Tool. We can create beautiful, interactive and detailed reports using Extent framework. We can add any information (such as events, screenshots, tags, devices, authors or any other relevant information) which is important for us to create an informative and stunning report.

Let’s move forward and see step by step guide on how to setup extent reports version 4 in Selenium WebDriver Scripts.

Steps To Generate Extent Reports Selenium:

  • Step 1: Firstly, create a TestNG project in eclipse
  • Step 2: Now Download Extent reports Version 4 JAR file or to get Extent Reports Maven dependency 4.06 – Download Extent Reports
  • Step 3: Add the downloaded library files (Jar file) to your project or add Extent Reports Maven Dependency

Here is extent reports maven dependency version 4.0.6

  • Step 4: Create a java class say ‘ExtentReportsClass’ and add the following code to it

Let’s validate title and logo on Google home page.


By using this external XML file (extent-config.xml), we could change the details such as Report Theme (either standard or dark), Report Title, Document Title etc.,

Console Output:

Refresh the project after execution of above ExtentReportsClass.java file. You could find an HTML file named “STMExtentReport.html” in your test-output folder. Copy the location of the STMExtentReport.html file and open it by using any browser. You could see beautiful high rich HTML reports as shown below.

Test Case Failed:

Extent Reports Version 4 Failed Test Case

Test Case Passed:

Extent Reports Version 4 Pass Test Case


Extent Reports Version 4 Dashboard

Popular Interview Questions Posts:

I have handpicked some other interesting posts for you.

Extent Reports Selenium Version 4

Rajkumar SM is a founder of SoftwareTestingMaterial. He is a certified Software Test Engineer by profession and blogger & youtuber by choice. He has an extensive experience in the field of Software Testing. He writes here about Software Testing which includes both Manual and Automation Testing. He loves to be with his wife and cute little kid 'Freedom'.

Leave a Comment

Share via
Copy link
Powered by Social Snap