What is the full class name of "SimplyTest"?
If it is "component1.SimplyTest", then you would probably have to use:
<batchtest>
<fileset dir="C:\root_dir\testcases" includes="**/*Test.class"/>
</batchtest>
If that doesn't work then it may be necessary to specify each package
seperately:
<batchtest>
<fileset dir="${root}">
<include name="testcases/component1/*Test.java" />
<include name="testcases/component2/*Test.java" />
</fileset>
</batchtest>
or:
<batchtest>
<fileset dir="${root}\testcases">
<include name="component1/*Test.java" />
<include name="component2/*Test.java" />
</fileset>
</batchtest>
Denis Bessmertnyj wrote:
Here is my code
<batchtest>
<fileset dir="C:\root_dir" includes="**/*Test.class"/>
</batchtest>
And I receive
TestCase SimplyTest
Name Status Type Time(s)
testcases.component1.SimplyTest
java.lang.ClassNotFoundException: testcases.component1.SimplyTest
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
Note, that directories and Test Cases names a bit other.
----- Original Message ----- From: "Donald McLean" <[EMAIL PROTECTED]>
To: "Ant Users List" <user@ant.apache.org>
Sent: Friday, April 27, 2007 7:28 PM
Subject: Re: How I may run junit test cases in packages?
Ok, this is just a wild guess, but is this where you would use
something like:
<batchtest>
<fileset dir="${root}">
<include name="**/Test*.java" />
</fileset>
</batchtest>
Donald
Denis Bessmertnyj wrote:
Hi All,
My JUnit Test Cases have the next package structure
/root_dir
/testcase
/component1
/TestComponent1.class
/component2
/TestComponent2.class
How I may run all this test cases with <junit> task. May you give me
and example.
Take note that Ant need to run this test cases without directly
specifying test case
class names or packages. Ant may know only root_dir location.
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]