md_sagri
April 7th, 2007, 07:05 AM
I have the following out put for my test-dao
compile-dao-tests:
[echo] Compiling testDao...
[javac] Compiling 1 source file to /home/quayum/lastDay/collegeDB/eservrepos/eservices/trunk/build/eapphr/WEB-INF/classes
[echo] compilation of test comleted
init:
Trying to override old definition of task propertycopy
prepare:
db-load:
[dbunit] Executing operation: CLEAN_INSERT
[dbunit] on file: /DB/eserv/sample-data.xml
[dbunit] with format: xml
with-debug:
no-debug:
check-debug:
test-dao:
[echo] Testing testDao...
[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 (wrong name: com/infistech/eservices/apps/hr/testDao/AddressDaoTest)
[junit] java.lang.NoClassDefFoundError: AddressDaoTest (wrong name: com/infistech/eservices/apps/hr/testDao/AddressDaoTest)
[junit] at java.lang.ClassLoader.defineClass1(Native Method)
[junit] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
[junit] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[junit] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
[junit] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
[junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[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
BUILD FAILED
the code for junit is as follows:
<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>
can any one please help
compile-dao-tests:
[echo] Compiling testDao...
[javac] Compiling 1 source file to /home/quayum/lastDay/collegeDB/eservrepos/eservices/trunk/build/eapphr/WEB-INF/classes
[echo] compilation of test comleted
init:
Trying to override old definition of task propertycopy
prepare:
db-load:
[dbunit] Executing operation: CLEAN_INSERT
[dbunit] on file: /DB/eserv/sample-data.xml
[dbunit] with format: xml
with-debug:
no-debug:
check-debug:
test-dao:
[echo] Testing testDao...
[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 (wrong name: com/infistech/eservices/apps/hr/testDao/AddressDaoTest)
[junit] java.lang.NoClassDefFoundError: AddressDaoTest (wrong name: com/infistech/eservices/apps/hr/testDao/AddressDaoTest)
[junit] at java.lang.ClassLoader.defineClass1(Native Method)
[junit] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
[junit] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[junit] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
[junit] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
[junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[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
BUILD FAILED
the code for junit is as follows:
<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>
can any one please help