As promised in my earlier post below are the steps to generate Selenium Test Execution reports in HTML using Maven. If you would like to know How to Integrate Selenium Web Driver with Maven please refer to my earlier article here.
Edit the pom.xml and add the below contents just above </project>.
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19.1</version>
</plugin>
</plugins>
</reporting>
Right click on the pom.xml from the Package Explorer. Select Run AS --> Maven test.
You should be able to execute the test successfully and should be able to see “Build Success” message in the console.
Now once again right click on the pom.xml from the Package Explorer. Select Run As --> Maven Build…
Now in the Edit Configuration window, just type “site” under Goals and Click on Run Button.
Now once the Reports are generated you will be able to see “Build Success” message in the console. Refresh your Package Explorer contents. Navigate to target --> site to view the generated HTML reports as shown below.
Thanks for reading my articles. Hope you have enjoyed reading & implementing the same. Happy Testing..!!
Edit the pom.xml and add the below contents just above </project>.
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19.1</version>
</plugin>
</plugins>
</reporting>
Right click on the pom.xml from the Package Explorer. Select Run AS --> Maven test.
You should be able to execute the test successfully and should be able to see “Build Success” message in the console.
Now once again right click on the pom.xml from the Package Explorer. Select Run As --> Maven Build…
Now in the Edit Configuration window, just type “site” under Goals and Click on Run Button.
Now once the Reports are generated you will be able to see “Build Success” message in the console. Refresh your Package Explorer contents. Navigate to target --> site to view the generated HTML reports as shown below.
Thanks for reading my articles. Hope you have enjoyed reading & implementing the same. Happy Testing..!!
Generating HTML reports for Selenium Tests in Maven
Reviewed by Suntaragali The Smart Techie
on
August 11, 2016
Rating:
No comments: