TestNG testing framework — Extent Report

Arvind Choudhary
2 min readJul 9, 2022
TestNG
TestNG

Problem with TestNG?

HTML Reporting, default report generated by testng post execution shows bare minimum details with static pages and without any presentation elements. In case you have to show a report to the audience from a non-technical background, they will be first confused about what is this and from where to start.

It is easier for everyone to make data out of charts and diagrams because professionals other than testers are looking for a summary report rather than detailed testing reporting which has multiple sections like the one shown below.

TestNG HTML report
testng report

What Alternative do we have?

we have few famous open-source test reporting tools.

  1. ExtentReports
  2. Allure

In this article I’ll be explaining more on ExtentReports, how to configure and use it.

ExtentReports

ExtentReports is an open-source reporting library useful for test automation. It can be easily integrated with major testing frameworks like JUnit, NUnit, TestNG, etc. These reports are HTML documents that depict results as pie charts.

HTML report snapshots

Failed scenario
invalid case
valid case
summary page

TestClass.java with extent configuration

TestClass.java

pom.xml (extentreport dependency)

    <dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>5.0.9</version>
</dependency>

Console output

:: Before Class
:: After Class

--

--