ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "andy wix" <stix...@hotmail.com>
Subject JUnit task
Date Mon, 05 Dec 2005 15:48:45 GMT
Hi,
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"/>
      </fileset>
    </batchtest>
  </junit>
</target>

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(Class.java:131)

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

Thanks,
Andy

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters


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


Mime
View raw message