Test execution report in Maven

Maven surefire plug-in generates the test execution report in XML format. But you can convert that XML report in HTML format using below maven command. To generate the report using surefire report plugin, we need to use below command.

surefire-report:report

It creates report in target/site/surefire-report.html Alternatively, you can also use below tags in POM.xml and use mvn site command to execute the tests as well as generate the HTML report.
 
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19.1</version>
</plugin>
</plugins>
</reporting>

Surefire report plug-in generates report for both types of frameworks like JUnit and TestNG. If you are using testNG, TestNG reports could be useful as well. TestNG reports are inside sure-fire report directory.

Web development and Automation testing

solutions delivered!!