How to disable HTML Reporting for TestNG with Maven?

Maven is a project management and comprehension tool that provides a complete build lifecycle framework. User can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle.

In case of multiple environments, Maven can set−up the way to work as per standards in a very short time. As most of the project setups are simple and reusable, Maven makes life easy while creating reports, checks, build and testing automation setups.

Maven provides developers ways to manage the following:

  • Builds

  • Documentation

  • Reporting

  • Dependencies

  • SCMs

  • Releases

  • Distribution

  • Mailing list

TestNG is a testing framework and can use Maven as build tool. It helps to maintain dependencies and their version at one place in pom.xml. TestNG also generates the different kind of reports like HTML, XML in test−output folder along with maven reports those are present under target/maven−surefire−reports.

Since Maven is a build tool and get more details in the reports it is not worth to generate 2 different HTML reports for same test case run. User can disable HTML reporting of TestNG by simply configure in pom.xml as shown below:



This is a maven configuration file that is used to organize dependencies, plugins and run the TestNG test cases.

It is very handy when limited tests are needed to execute rather than full suite.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""


Updated on: 16-Aug-2023


Kickstart Your Career

Get certified by completing the course

Get Started