Fork me on GitHub

Usage

Generate the Report as Part of Project Reports

To generate the Surefire report as part of the site generation, add the following in the <reporting> section of your POM:

<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>3.2.5</version>
      </plugin>
    </plugins>
  </reporting>
  ...
</project>

When mvn site is invoked, the report will automatically be included in the Project Reports menu as shown in the figure below.

Sample Surefire Report

Generate the Report in a Standalone Fashion

The plugin can also generate the report using its standalone goal:

mvn surefire-report:report  

A HTML report should be generated in ${basedir}/target/site/surefire-report.html.

Sample standalone surefire-report