In the preceding section, we ran the unit tests, and the results were generated in the
xml format. Often, developers need to generate more readable reports. Also, as a matter of fact, the reports should be a part of site documentation for better collaboration and information available in one place. To generate an HTML report and make it a part of site documentation, add the dependency under the
reporting element as
plugin in the
pom file as follows:
<reporting> <plugins> …... <!-- For HTML test report generation --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.17</version> </plugin> …... </plugins> </reporting>
After the addition ...