I believe the problem is that you are only including .class files from the
{basedir}/test directory and not all subdirectories of {basedir}/testYour <include> tag should be <include name="**/*.class"/> Try that. That should be it. -----Original Message----- From: Joseph Yang [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 1:16 PM To: [EMAIL PROTECTED] Subject: Junit test problem 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
