Error while executing mvn site comment | Selenium Forum
M
Posted on 13/03/2016
[attachment=1:91kgctmm]pom.xml[/attachment:91kgctmm]I configured Maven as per your video. and all my testcases are executing correctly but when i try to generate xxslt report using mvn site comment getting this error "Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site". Please find my POM.xml attached

M
Replied on 14/03/2016

reporty ng has been deprecated you cannot make xslt reports from maven you have to use ANT.

if you are not using ANT and want to make good looking reports with maven use this

1. go to this link <http://relevantcodes.com/testng-listener-using-extentreports/>
2. create class "ExtentReporterNG". This is Listener class and put second block code in it from upper link and save it.
3. put ExtentReporterNG this listener in your testneg.xml. change package name with your package name.
<listeners>
<listener class-name="package.ExtentReporterNG" />
</listeners>
4. Add dependency in you POM.xml
<!-- Extent Reports -->
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.40.1</version>
</dependency>

5. now open cmd prompt and go to your project location and run command "mvn compile" and after it run "mvn package"
6. go in eclipse and refresh your project and run your testng.xml
7. after running refresh your project and check report in test output folder.
8. a folder generate with your class name. check extent.html in it and open this in web browser.


M
Replied on 14/03/2016

Hi Ashish,

Thanks for your reply.
I dont see the code for these 3 classes in the site. Where can I get these.

import com.relevantcodes.extentreports.ExtentReports;
import com.relevantcodes.extentreports.ExtentTest;
import com.relevantcodes.extentreports.LogStatus;


M
Replied on 14/03/2016

you can find all the data on there website. http://relevantcodes.com/extentreports-for-selenium/