From: <lud...@gm...> - 2005-05-27 15:17:35
|
Hi, i'm trying to execute the j-unit test below via ant/ant-contrib. Im getting the error: Buildfile: C:\ablage\workspace\smartideeDPAG\build.xml test: BUILD FAILED: java.lang.NoClassDefFoundError: simpleTest (wrong name: de/test/simpleTest) Total time: 1 second What does this error mean [wrong name], what am i doing wrong? The Junit - Test is running fine in Eclipse. I also tried building the Ant File via the wildcard option: <batchtest todir="de/test" > <fileset dir="classes/test"> <include name="**/*Test.class*"/> </fileset> </batchtest> but ended in the same error. The Junit-Test: package de.test; public class simpleTest extends TestCase{ protected void setUp() throws Exception { super.setUp(); System.out.println("SetUp"); } protected void tearDown() throws Exception { super.tearDown(); System.out.println("TEarDown"); } public void testSimple() throws Exception { assertEquals( "Equality Test", 1, 1 ); } } The Ant-File: <project default="test"> <!-- the compiled junit class exists in classes/de/test--> <property name="tst-dir" location="classes/de/test" /> <property name="TALK" value="true" /> <path id="classpath.base"> </path> <path id="classpath.test"> <pathelement location="${tst-dir}" /> <path refid="classpath.base" /> </path> <target name="test" depends=""> <junit> <classpath refid="classpath.test" /> <formatter type="brief" usefile="false" /> <test name="simpleTest" /> </junit> </target> </project> Thanks in advance for any hints -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse für Mail, Message, More +++ |