I am using Selenium WebDriver + TestNG with java in Eclipse. I want to generate better report using ReportNG rather than normal TestNG report. I have configured the build path with reportng-1.1.2.jar and velocity-dep-1.4.jar. I have also disabled the default TestNG Report from Project > Properties > TestNG > "Disable Default Listeners" Presently I have created a testNg.xml file that runs my tests as complete Test Suite. The content of xml file is as below:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="5" skipfailedinvocationCounts="false" verbose="1" preserve-order="true" name="testingXML" junit="false" parallel="false" annotations="JDK">
<test verbose="2" name="com.src.com.pcrm.pageobjects.*" junit="false" annotations="JDK">
<testng classpathref="test-path"
outputdir="${test-results.dir}"
haltonfailure="true"
useDefaultListeners="false"
listeners="org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter">
<xmlfileset dir="." includes="testng.xml"/>
<sysproperty key="org.uncommons.reportng.title" value="My Test Report"/>
</testng>
<classes>
<class name="com.pcrm.pageobjects.HomeTest"/>
<methods>
<include name="testManadatoryFieldsOnHomePage"/>
<include name="testIsLogoDisplayed"/>
<include name="testUrlCheck"/>
</methods>
But When I executed this xml file it did not generate any ReportNG reports. What's the wrong? Help is appreciated.
My best guess is that it's a classpath issue. Make certain that the ReportNG and Velocity JARs are on the classpath. See this related question about a similar problem using ReportNG with Selenium.