i have a maven project with eclipse with some selenium tests.I can run them in command line and i got the report in my target folder in txt and xml format.
But i want the report in html format.Whatt should i add in my POM file.
Thank you very much.
Here is my POM.xml
....<dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.11</version><scope>test</scope></dependency><dependency><groupId>org.seleniumhq.selenium</groupId><artifactId>selenium-java</artifactId><version>2.44.0</version></dependency><dependency><groupId>com.itextpdf</groupId><artifactId>itextpdf</artifactId><version>5.5.3</version></dependency><dependency><groupId>com.oracle</groupId><artifactId>ojdbc6</artifactId><version>11.2.0</version></dependency><dependency><groupId>javax.mail</groupId><artifactId>mail</artifactId><version>1.4.3</version></dependency></dependencies><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>2.3.2</version><configuration><source>1.6</source><target>1.6</target></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><version>2.4</version><executions><execution><id>copy</id><phase>package</phase></execution></executions></plugin></plugins></build><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties></project>
Best Answer
See this question, as the 2nd answer points out, you should be able to use the Maven Surefire Report plugin.
"The Surefire Report Plugin parses the generated TEST-*.xml files under ${basedir}/target/surefire-reports and renders them using DOXIA, which creates the web interface version of the test results."
Here is the XML to configure it:
<reporting><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-report-plugin</artifactId><version>2.18</version></plugin></plugins></reporting>
Either of the following commands will invoke it:
mvn site
mvn surefire-report:report