Hi,

I cannot get TestNG tests to run in ANT. It complains of a "Cannot load
class from file: <test_file_name>" error.

This is the snippet from my ANT build file.

         <target name="tests" description="Task to execute TestNG Unit
Tests">
                <echo>Start: TestNG Unit Testing</echo>
                <taskdef name="testng" classname="org.testng.TestNGAntTask"
classpath="${lib}/testng-5.8-jdk15.jar"/>
                        <testng outputDir="." haltonfailure="false" verbose="3">
                                <classpath> 
                                        <fileset dir="${build.bin}" 
includes="**/*.class" />
                                        <fileset dir="${lib}" includes="*.jar" 
excludes="*.db"/>
                                </classpath>
                                <classfileset dir="${build.bin}" 
includes="**/*Test.class"/>
                        </testng>
                <echo>End: TestNG Testing</echo>
        </target>

What confuses me here is that it finds the Test files as denoted by the
"**/*Test.class" expression but doesn't see to be able to find the
corresponding class files when attempting to run these.

Where am I going wrong here as I've tried all classpath variations at this
stage.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Error-when-attempting-to-run-TestNG-tests-in-ANT-tp23830098p23830098.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to