Maven Tutorial
Introduction to Maven Installation and environment configuration Maven settings Standard directory structure in Maven project command line IntelliJ IDEA Super POM and Parent POM Understanding POM.xml file Declaring maven dependencies Dependency management using repositories in Maven Adding jar file as a dependency in Maven Maven archetypes Maven build life cycle, phases and goals Generating project API documentation Generating Site documentation for a project Installing artifacts in local repository Deploying the artifact on remote repository Maven plug-ins surefire plugin compiler plugin Profiles in MavenExecuting Maven phases and goals through command prompt Maven command line optionsexec-maven-plugin usage Skipping tests in Maven Test execution report in MavenTest 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!!