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]

Reply via email to