Selenium test reporting with maven surefire report plugin

If you are familiar with Junit, you may have already known the maven surefire plugin which enables running unit test inside maven build cycles. Normally, surefire plugin generates the XML test reports at /target/surefire-reports directory. If you use selenium RC integrated with your build system or as a separate test framework, you may use maven-selenium-plugin coupled with the surefire plugin to launch your tests.
As far as I know, there are two ways to generate test reports when selenium is coupled with maven.

1. Use LoggingSelenium java library to generate HTML test reports with screenshots

2. Use maven-surefire-report plugin

This post is about the latter one, maven-surefire-report plugin.

The default configuration of surefire-report-plugin is trivial. You just need to add a <reporting> element to projects' pom.xml as follows.


<groupId>org.apache.maven.plugins</groupId> <





When you run mvn surefire-report:report goal after running the tests, HTML based descriptive report will be created at the specified output directory. In this mechanism, you do not use anything specific to selenium,but get the advantage of surefire report plugin in test reporting.


Popular posts from this blog

Common mistakes to avoid in WSO2 ESB - 1 - "org.apache.axis2.AxisFault: The system cannot infer the transport information from the URL"

Working with HTTP multipart requests in soapUI

How to deploy JSR181 annotated class in Apache Axis2