I have configured everything as needed for reportNG.
But while building the build.xml it thorws me the below error.
BUILD FAILED
C:\New_WorkSpace\SampleTestNG\build.xml:66: Reference test-path not
found.
Build.XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create
one in the same
directory with the processing instruction <?
eclipse.ant.import?>
as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="SampleTestNG">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<path id="SampleTestNG.classpath">
<pathelement location="bin"/>
<pathelement location="../../Documents and Settings/bkasira/My
Documents/Technical_Apps/selenium-java-2.4.0/selenium-2.4.0/selenium-
java-2.4.0.jar"/>
<pathelement location="../../Documents and Settings/bkasira/My
Documents/Technical_Apps/selenium-server-standalone-2.4.0.jar"/>
<pathelement location="../../Documents and Settings/bkasira/My
Documents/Technical_Apps/ReportNG/ReportNG/reportng/lib/runtime/
velocity-dep-1.4.jar"/>
<pathelement location="../../Documents and Settings/bkasira/My
Documents/Technical_Apps/reportng-1.1.3.jar"/>
<pathelement location="../../Documents and Settings/bkasira/My
Documents/Technical_Apps/testng-5.14.10/testng-5.14.10/
testng-5.13.1.jar"/>
<pathelement location="../../Documents and Settings/bkasira/My
Documents/Technical_Apps/guice-1.0.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${
ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin"
source="${source}" target="${target}">
<src path="src"/>
<classpath refid="SampleTestNG.classpath"/>
</javac>
</target>
<target description="Build all projects which reference this
project. Useful to propagate changes." name="build-refprojects"/>
<target description="copy Eclipse compiler jars to ant lib
directory" name="init-eclipse-compiler">
<copy todir="${ant.library.dir}">
<fileset dir="${ECLIPSE_HOME}/plugins"
includes="org.eclipse.jdt.core_*.jar"/>
</copy>
<unzip dest="${ant.library.dir}">
<patternset includes="jdtCompilerAdapter.jar"/>
<fileset dir="${ECLIPSE_HOME}/plugins"
includes="org.eclipse.jdt.core_*.jar"/>
</unzip>
</target>
<target description="compile project with Eclipse compiler"
name="build-eclipse-compiler">
<property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<antcall target="build"/>
</target>
<!-- Runs the file and generates oReportng report -->
<target name="TestNG" description="Running tests" >
<echo>Running Tests...</echo>
<taskdef resource="testngtasks" classpath="${extralib.dir}/
testng-5.13.1.jar" />
<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>
</target>
<!-- Open the report in browser.-->
<target name="openReport">
<exec executable="${browser}" spawn="yes">
<arg line="'${report.dir}\html\index.html'" />
</exec>
</target>
</project>
On Aug 2, 1:19 am, "Baskar.R" <
torgbas...@gmail.com> wrote:
> issue resolved.
>
> if we get the below error
>
> java.lang.NoClassDefFoundError: com/google/inject/Module
>
> > at java.lang.Class.getDeclaredMethods0(Native Method)
>
> Please download google juice jar and add to your eclipse lib folder.
> Then select Project properties ->testNG->Disable default listeners.
>
> then you will get theReportNGtest results in the "test-output\html"
> directory. Note: this is the default test results directory for
> TestNG.
>
> Thanks,
> Baskar
>
> On Jul 30, 12:43 am, "Baskar.R" <
torgbas...@gmail.com> wrote:
>
> > Hi All,
>
> > PLEASE HELP ME TO GET TEST RESULTS INREPORTNG.it would be a great
> > help for me.
>
> > I am trying to setup the test results toReportNG,the test is
> > executing sucessfully, but at the end of the test i am getting the
> > following error.
>
> > Configuration used: Eclipse,TestNG,ReportNG
>
> > i copied theReportNG.jar and velocity.jar to the lib directory and