ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Yang" <ya...@rewardstream.com>
Subject Junit test problem
Date Fri, 06 Jun 2003 18:16:05 GMT

Hello all,

I am very new to ant, I need some help please (I have searched the mail
archive...), I am trying to run junit test using ant, in build.xml

 <path id="test.path">
        <fileset dir="${basedir}/test">
            <include name="*.class"/>
        </fileset>
 </path>

    <target name="runtests" depends="compiletests">
    	<junit fork="yes" haltonerror="no" haltonfailure="no"
printsummary="yes" >
    	    <classpath refid="test.path"/>
	    <test fork="true" name="teluswonderland.AllTests" haltonfailure="yes"
outfile="result">
	        <formatter type="xml"/>
	    </test>
    	</junit>
    </target>

When I run the test, it keeps giving me error as below, how to solve this?

  <error message="teluswonderland.AllTests"
type="java.lang.ClassNotFoundException">java.lang.ClassNotFoundException:
teluswonderland.AllTests
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:115)
</error>

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message