Reporty-ng is not available while running through Maven | Selenium Forum
M
Posted on 21/10/2015
Hi Ashish,I'm getting this error while i'm executing my project through Maven.

[color=#BF0000:fu9rnsyo]In Console::[/color:fu9rnsyo]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project Core_Hybrid_Framework: failed to get repo
rt for org.reportyng:reporty-ng: Plugin org.reportyng:reporty-ng:1.2 or one of its dependencies could not be resolved: Could not find artifact org.rep
ortyng:reporty-ng:jar:1.2 in reporty-ng (https://github.com/cosminaru/reporty-ng/raw/master/dist/maven) -> [Help 1]


[color=#0000BF:fu9rnsyo] In pom.xml:::[/color:fu9rnsyo]
<reporting>
<plugins>
<!-- TestNG-xslt related configuration. -->
<plugin>
<groupId>org.reportyng</groupId>
<artifactId>reporty-ng</artifactId>
<version>1.2</version>
<configuration>
<!-- Output directory for the testng xslt report -->
<outputdir>/target/testng-xslt-report</outputdir>
<sorttestcaselinks>true</sorttestcaselinks>
<testdetailsfilter>FAIL,SKIP,PASS,CONF,BY_CLASS</testdetailsfilter>
<showruntimetotals>true</showruntimetotals>
</configuration>
</plugin>
</plugins>
</reporting>

<pluginRepositories>
<pluginRepository>
<id>reporty-ng</id>
<url>https://github.com/cosminaru/reporty-ng/raw/master/dist/maven</url>
</pluginRepository>
</pluginRepositories>

Could you please help me in this regard.

M
Replied on 21/10/2015

either you have to use ant with maven to make xslt reports.

or use extent 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 04/06/2016

Hi Ashish,

I tried above solution but am getting below error, could you please help:

[code:c9vmooj2]java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
at com.relevantcodes.extentreports.Configuration.getConfigurationMap(Configuration.java:38)
at com.relevantcodes.extentreports.Report.loadConfig(Report.java:445)
at com.relevantcodes.extentreports.Report.<init>(Report.java:566)
at com.relevantcodes.extentreports.ExtentReports.<init>(ExtentReports.java:66)
at com.relevantcodes.extentreports.ExtentReports.<init>(ExtentReports.java:362)
at com.qtpselenium.framework.datadriver.ExtentReporterNG.generateReport(ExtentReporterNG.java:26)
at org.testng.TestNG.generateReports(TestNG.java:1135)
at org.testng.TestNG.run(TestNG.java:1081)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 33 more
[/code:c9vmooj2]


M
Replied on 05/06/2016

use this jar file

[code:18pb5k52]<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>[/code:18pb5k52]


M
Replied on 08/06/2016

Hi Ashish,

I am getting the same error for Maven when i practice for Module 21. Tried to create the class in the url that was shown.
But where should i create the class and it's having dependency on another class. not able to fix this issue.
can you please help.

Padmavathi


M
Replied on 09/06/2016

Padmavathi start a new topic(ticket)