atom feed15 messages in org.apache.ant.userjunit problem w/JUnitTask and/or ZipE...
FromSent OnAttachments
Robert SimmonsAug 27, 2003 3:31 pm 
Jan....@rzf.fin-nrw.deAug 27, 2003 10:19 pm 
Mike D'AmbrogiaAug 28, 2003 6:51 am 
Amitav CAug 28, 2003 6:58 am 
Mike D'AmbrogiaAug 28, 2003 7:06 am 
Antoine Levy-LambertAug 28, 2003 7:07 am 
Stefan BodewigAug 28, 2003 7:38 am 
Mike D'AmbrogiaAug 28, 2003 7:42 am 
Mike D'AmbrogiaAug 28, 2003 7:57 am 
Robert SimmonsAug 28, 2003 9:06 am 
Matt BensonAug 28, 2003 12:59 pm 
Robert SimmonsAug 28, 2003 1:25 pm 
Claudio CorsiAug 28, 2003 2:45 pm 
Claudio CorsiAug 28, 2003 3:40 pm 
Jan....@rzf.fin-nrw.deAug 29, 2003 12:19 am 
Subject:junit problem w/JUnitTask and/or ZipException
From:Mike D'Ambrogia (mik@jamagination.com)
Date:Aug 28, 2003 6:51:16 am
List:org.apache.ant.user

I gotta be doing something really stupid here, somewhat new to both Java and ANT so if my issue this has the itchy "newbie feel" to it then you'll know why. My money is on a classpath conflict issue, but I can't for the life of me figure out what/where.

I've put all the console output text (ANT diagnostic, ant -debug junit, build.xml snippet, etc) at http://www.tworock.com/mjd/java/junit_prob.html, too much info to include here. file size is 77k or so.

Junit 3.8.1 and ANT 1.5.3, j2sdk1.4.1_03 on Win XP Home SP1a. I have confirmed that optional.jar in c:\ant\lib does contain JUnitTask at org.apache.tools.ant.taskdefs.optional.junit. I've also run all 3 of the junit sample tests without issue from the command line. Using netbeans 3.5.1 as my IDE, and the test(s) all run without issue from inside the IDE.

I'm having trouble with a junit task generating a JUnitTask.execute error on my testfile DBObjectTest.class:

build.xml [51] Test DbObjectTest failed at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav a:568) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav a:527) at org.apache.tools.ant.Task.perform(Task.java:341) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1339) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397) at org.apache.tools.ant.Task.perform(Task.java:341) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1339) at org.apache.tools.ant.Project.executeTargets(Project.java:1255) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:331) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)

and I get this error too which doesn't make sense:

Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource DbObjectTest.class from C:\Documents and Settings\miked\My Documents\ir-dev\jUnit\com\iroyalty\db\DbObjectTest.class

my text files are not in a .jar/zip so I'm not sure why I'm getting a ZipException issue

the dir tree for src and test look like

src = C:\Documents and Settings\miked\My Documents\ir-dev\jsp\WEB-INF\classes\com\iroyalty\db tests = C:\Documents and Settings\miked\My Documents\ir-dev\jUnit\com\iroyalty\db

build file snippet is currently this:

<target name="junit" description="start here"> <junit haltonfailure="yes" printsummary="yes" showoutput="yes"> <batchtest> <fileset dir="C:\Documents and Settings\miked\My Documents\ir-dev\jUnit\com\iroyalty\db" includes="*Test.class"/> </batchtest> </junit> </target>

All help appreciated,

Mike