ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "andy wix" <>
Subject JUnit task
Date Mon, 05 Dec 2005 15:48:45 GMT
I am having difficulty setting the classpath for this.
If I have a testing directory under the basedir (and these tests are in the 
testing package) what classpath do I need to define to use batch tests?

So I want to be able to run all the test classes in that directory:

<target name="test" >
  <junit printsummary="withOutAndErr" showoutput="yes">
  <formatter type="brief" usefile="false"/>
    <batchtest fork="yes">
      <fileset dir="testing">
        <include name="**/*Test.class"/>

When I run this I get:
[junit] Null Test: Caused an ERROR
[junit] MyTest
[junit] java.lang.ClassNotFoundException: MyTest
[junit] at java.lang.Class.forName(

so it seems the fileset bit works (finds the test) but JUnit doesn't have 
the classpath.


Be the first to hear what's new at MSN - sign up to our free newsletters!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message