ReportNG does not provide any report

I heard that ReportNG produces a better report than a regular TestNG report. I tried to create a ReportNG report but could not. I use Eclipse and I downloaded ReportNG and added reportng-1.1.3.jar and speed-dep-1.4.jar to the classpath and wrote testng-suite.xml as shown below:

<suite name="SA" verbose="10">
<listeners>
  <listener class-name="org.uncommons.reportng.HTMLReporter" />
  <listener class-name="org.uncommons.reportng.JUnitXMLReporter" />
</listeners>
...
</suite>   

when I executed, I could see the default report TestNG, not the ReportNG report. What else should I do to get a ReportNG report (for example, extend any class or implement listeners or write a piece of code)?

I also heard that I need to use this command, useDefaultListeners = "false", but where should I include in testng-suite.xml? Everyone is talking about ANT, but I personally don't like it. So, is there a way to include the above command in testng-suite.xml?

+4
source share
3 answers

To disable standard artists,

Goto Eclipse Project-> Properties -> TestNG -> Disable deafult listeners.

After starting, you will receive the following error:

java.lang.NoClassDefFoundError: com/google/inject/Module 
        at java.lang.Class.getDeclaredMethods0(Native Method) 
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source) 
        at java.lang.Class.privateGetPublicMethods(Unknown Source) 
        at java.lang.Class.getMethods(Unknown Source) 

to solve this problem, download google-guice-3.0.zip and paste guice-3.0.jar into your classpath.

Now run and check the report in the workspace / test-output / html.

+3
source

I am the author of ReportNG. You do not need to write Java code to make it work. You just need to be able to register listeners with TestNG on which tool you use.

ReportNG Ant, , Maven Gradle. , - , . ? , , - , ReportNG JAR .

, TestNG testng.xml. , , , Ant, , , , , TestNG Selenium.

+3

Eclipse? XML " ... TestNG suite". , .

, , , , , ReportNG, , TestNG. , - Eclipse, , , , "-usedefaultlisteners false" .

+3

All Articles