Unable to generate XSL|TT reports | Selenium Forum
M
Posted on 30/12/2015
Hi Ashish,

i am unable to generate xslt reports. \i tried the below solution also but unable to generate reports.


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 30/12/2015

Hi Ashish,

Could you please record a video on how to generate xslt reports with the new Extent Reports concept. Please!!!

The maven "<groupId>org.reportyng</groupId>" this is no longer avialable. Also the repository mentioned in the pom
<pluginRepositories>
<pluginRepository>
<id>reporty-ng</id>
<url>https://github.com/cosminaru/reporty-ng/raw/master/dist/maven</url>
</pluginRepository>
</pluginRepositories>
</project>
is also no longer avialble.

Please guide.

Thanks
Abdul


M
Replied on 30/12/2015

you cannot generate xslt reports by maven. if you want to generate xslt reports then use ANT.


M
Replied on 01/01/2016

Then through maven we can only generate surefire reports?

You had mentioned about extent.html report.. I tried that i could gnerate the extent.html report. but the issue is we need to run the testng.xml again from eclipse ONLY to generate report. If wwe run the maven commands extent.html is not generated.

Is thier any alternative for this?


M
Replied on 01/01/2016

run testng.xml by pom.xml



http://howtodoinjava.com/2014/12/03/how-to-execute-testng-tests-with-maven-build/


M
Replied on 02/01/2016

Hi Ashish,

Please see the configurations done.
1. Since maven xlst reports are not working i have included extent-reports dependencies in the pom.xml
2. Maven surefire reports depency is included in the pom.xml along with testng and related suites.xml´s
3. when i compile and run the project through maven using mvn comile test or mvn compile test site commands the project runs and generates the surefire reports , but does not generate the extent.html file in testoutput folder.

However when i run the testng file thorugh eclipse as testng file, the extent. html file is generated( extent.html report are more cathcy than xslt reports)

Please guide. I have been trying to sove this isnce 2 days but no success:(

Please see attached the pom.xml file and screen shots of maven project running.


M
Replied on 03/01/2016

ok how about you zip and upload the project. there seems no mistake in pom.xml. i will run the entire code.


M
Replied on 11/01/2016

Hi Ashish,

Please find the zipped project...


M
Replied on 11/01/2016

the project is creating extent.html

Responsive image

M
Replied on 16/01/2016

Dear Ashish,

As mentioned earlier, the issue is if you run the project through MAVEN, the Test_output Folder is not generated. But if you run the project i.e run the testng.xml from Eclipse as a TestNg Project the Test-Ouput folder is generated which contains the extent.html report.

I had sent you the zipped project which was already executed using TestNg.xml from eclipse and may be when you executed at your end you saw the extent.html report.

I would request you to delete the folder test-ouput from the project and Run from Maven ,You would see that the Test-output folder will not be generated and hence neither extent.html.
And the same project please run from Eclipse as TestNG, then you will see the Test-output generated with extent.html report.

Hope its clear.

So I request you to suggest any solution to this problem.

Testng.xml is included in my Pom.xml and registered in Pom.xml.


M
Replied on 17/01/2016

the extent reports are generated by this listener

[code:3cr9t8ai]<listeners>
<listener class-name="package.ExtentReporterNG" />
</listeners>
[/code:3cr9t8ai]

so if you want to create extent reports you have to execute testng.xml. you can execute testng.xml by maven.
http://howtodoinjava.com/2014/12/03/how-to-execute-testng-tests-with-maven-build/


M
Replied on 08/02/2016

Dear Ashish,

Were able to look into this issue. ?

Please. I remain attentive.


M
Replied on 08/02/2016

hi what is troubling you?