Cover by Srirangan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Generating unit test reports

The Maven Surefire plugin is executed in the "test" phase of the build lifecycle to run the unit tests, generate plain text, and XML reports of the tests.

The Surefire plugin comes with one goal: surefire:test.

By default, Surefire reports can be found in {basedir}/target/surefire-reports.

Getting ready

To get started, you need to include the dependency of the Maven Surefile plugin in your project POM.xml file.

<project> ... <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.6</version> </plugin> ... </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required