Mvn test site : command is not working accoirding to module | Selenium Forum
M
Posted on 05/01/2016
hello QTPSelenium

Thanks for last time prompt solution now as video shown i am doing 1 part and it shown there is a command :[b:19hiwnho] mvn test site[/b:19hiwnho] when i execute the command from command prompt it run and execute the command but it is not being generated Xslt report and Build Failure and i am attaching the screen shot.

thanks

M
Replied on 05/01/2016

reports ng has been depreacted 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.04</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 07/01/2016

Hi Team,

I am also facing the same problem.

When I followed the steps that is posted, I could see the following error in eclipse. It is not able to import the following classes:

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

Can you please share the link where we can find the code for the above classes, so that we can import into our project and we can try?

Regards,
Lakshman


M
Replied on 07/01/2016

have you added jar files to your project?


M
Replied on 08/01/2016

Ashish,

if i wan to go for ANT then do i need to create project structure folders like src/main,src/test manually?

can't i use maven commands to create the Project structure?

or can i create Project structure using maven and then is it possible to place build.xml ?


M
Replied on 08/01/2016

http://stackoverflow.com/questions/11668583/maven-create-directory-structure-from-pom-xml
http://www.tutorialspoint.com/maven/maven_creating_project.htm


[quote:1lyc1yxd]C:\MVN>mvn archetype:generate
-DgroupId=com.companyname.bank
-DartifactId=consumerBanking
-DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false[/quote:1lyc1yxd]