S
stixwix
Hi,
I cannot get batchtest to work.
If i have a simple task that runs one test, it's ok:
<project name="MyProject" default="test" basedir=".">
<target name="test" >
<junit fork="yes" printsummary="withOutAndErr">
<formatter usefile="false" type="brief"/>
<test name="testing.MyTest"/>
</junit>
</target>
</project>
However, the following can't find the classes in the testing
directory...
<project name="MyProject" default="test" basedir=".">
<property name="src" location="testing"/>
<target name="test" >
<junit printsummary="withOutAndErr" showoutput="yes">
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${src}">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
</project>
For each test class in the testing directory, I get:
[junit] Null Test: Caused an ERROR
[junit] MyTest
[junit] java.lang.ClassNotFoundException: MyTest
[junit] at java.lang.Class.forName(Class.java:131)
I have tried including the classpath to no avail:
<classpath>
<pathelement location="${src}"/>
</classpath>
Any ideas?
Thanks,
Andy
I cannot get batchtest to work.
If i have a simple task that runs one test, it's ok:
<project name="MyProject" default="test" basedir=".">
<target name="test" >
<junit fork="yes" printsummary="withOutAndErr">
<formatter usefile="false" type="brief"/>
<test name="testing.MyTest"/>
</junit>
</target>
</project>
However, the following can't find the classes in the testing
directory...
<project name="MyProject" default="test" basedir=".">
<property name="src" location="testing"/>
<target name="test" >
<junit printsummary="withOutAndErr" showoutput="yes">
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${src}">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
</project>
For each test class in the testing directory, I get:
[junit] Null Test: Caused an ERROR
[junit] MyTest
[junit] java.lang.ClassNotFoundException: MyTest
[junit] at java.lang.Class.forName(Class.java:131)
I have tried including the classpath to no avail:
<classpath>
<pathelement location="${src}"/>
</classpath>
Any ideas?
Thanks,
Andy