from which directory does ant takes test classes for testing.

I have compiled the tes classes and used this to copy them to test/data
                        <batchtest todir="${test.dir}/data" if="testcase">
                              <fileset dir="${frameworkclasses.dir
}/com/infistech/eservices/apps/hr/@{module}">
                                  <include name="**/*${testcase}*"/>
                               <exclude name="**/*TestCase.class"/>
                                  <exclude name="**/*$*.class" />
                               </fileset>
                       </batchtest>
                       <batchtest todir="${test.dir}/data"
unless="testcase">
                              <fileset dir="${frameworkclasses.dir
}/com/infistech/eservices/apps/hr/@{module}">
                                  <include name="**/*Test.class*"/>
                                  <include name="**/*TestCase.class"/>
                                  <exclude name="**/*$*.class" />
                              </fileset>
                       </batchtest>

now when I run the test it throws ClassNotFound Exception.

test-dao:
    [echo] Testing testDao...
    [echo] testing with junit...
   [junit] Running AddressDaoTest
   [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
   [junit] Testsuite: AddressDaoTest
   [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
   [junit] Caused an ERROR
   [junit] AddressDaoTest
   [junit] java.lang.ClassNotFoundException: AddressDaoTest
   [junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   [junit] at java.security.AccessController.doPrivileged(Native Method)
   [junit] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   [junit] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
   [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   [junit] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   [junit] at java.lang.Class.forName0(Native Method)
   [junit] at java.lang.Class.forName(Class.java:164)
   [junit] Test AddressDaoTest FAILED

The .class files are not copied into test/@{module}/classes nither into
test/data

Reply via email to