October 2017
Intermediate to advanced
350 pages
7h 29m
English
By default, maven-surefire-plugin generates the XML resulting from a test suite execution as ${basedir}/target/surefire-reports/TEST-*.xml. This XML output can be easily parsed to HTML using the plugin maven-surefire-report-plugin. To that, we simply need to declare this plugin in the reporting clause of our pom.xml, as follows:
<reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>${maven-surefire-report-plugin.version}</version> </plugin> </plugins></reporting>
This way, when we invoque the Maven lifecycle for documentation (mvn site), an HTML page with the test result will be included in the general report.
See an example of the report, ...
Read now
Unlock full access