ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Mancarella" <mancare...@opoipi.bancaintesa.it>
Subject Re: JUnit problems
Date Mon, 19 Nov 2001 17:28:11 GMT
From: "Stefan Bodewig" <bodewig@apache.org>
Subject: Re: JUnit problems


> > Is it possible two have test output "swallowed" by the formatters,
> > even if I use fork=yes ?
> It is supposed to do that, sounds like a Bug - as well as the
> getResource call failing in the non-fork case.  Could you please file
> a (or several) bug report(s) so we keep track of it, thanks.

OK.
If it's useful I can set up a small test case for the problem...

> Are you specifying a custom classpath for the task?

Yep. Here's the relevant part of my buildfile:

<junit printsummary="true" fork="true">
   <classpath refid="tools.classpath"/>
   <formatter type="xml"/>
   <batchtest todir="${build.testresults}">
     <fileset dir="${build.tests}" includes="**/*Test.*"/>
   </batchtest>
</junit>

'tools.classpath' contains all my project classes and libraries, all test
classes and all resources (i.e. mainly property files).
Resources are loaded in the tests with:

Thread.currentThread().getContextClassLoader().getResourceAsStream("resource
Name")

but, as I said, this only works with fork=true (which leads to slower
testing and output re-appearing).

> Are you using an older version of Ant (i.e. 1.3)

I'm using Ant 1.4.
I haven't upgraded to 1.4.1 yet due to some patches I should re-apply to it
(I'm lazy).

P.S.: One of them is the war/ear update patch I sent some time ago and you
sayd should go in 1.5 - even if I haven't seen it applied to CVS yet.. ;)

>
> Stefan
>

Thanks for your help.



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message