Replying to my own post yes, but I have figured it out. My junit tests
were not working cause I was not forking (not sure why) and my for was
working cause I needed to add

<pathelement path="${java.class.path}" />

to my classpath.

Cheers,

Terrence


On Wed, 31 Jan 2001 [EMAIL PROTECTED] wrote:

> I am trying to get JUnit optional task to run my junit tests after I build
> my application. Unfortunately it does not seem to be working very well.
>
> I am using ant1.2 and junit 3.4.
>
> The specific of the problem is that while I can run in JBUilder, and on
> the command lin my junit tests (which connect to a database) when I run in
> the junit task I cannot connect to the database.
>
> I guess what I am looking for is some more information about what exactly
> the junit task is doing different from these other mechanisms.
>
> Here is how I am using junit (on a side note I have tried forking, however
> I get all sorts of classdef errors)
>
> <target name="unitTest"  if="runUnitTest">
>               <junit printsummary="yes">
>               <classpath>
>                       <pathelement path="${app.dir}/WEB-INF/classes/"/>
>                               <fileset refid="lib_compile_set"/>
>               </classpath>
>
>                       <formatter type="xml" />
>               <batchtest>
>                       <fileset refid="test_set"/>
>               </batchtest>
>
>       </junit>
> </target>
>
> This look ok?
>
> Thanks
>
>
> Terrence
>

Reply via email to