ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Roodt <gro...@gmail.com>
Subject Re: Need help viewing output from failed ant/junit tests
Date Fri, 05 Mar 2010 16:25:40 GMT
Ah, good suggestion Stefan. That makes sense.

I personally have had no issues capturing STDOUT, but I use the xml
formatter to generate JUnit reports on Hudson. Also, this looks like a
particularly nasty little problem if the test times out or runs out of stack
in a different environment.

Cheers
Greg



On Fri, Mar 5, 2010 at 4:17 PM, Stefan Bodewig <bodewig@apache.org> wrote:

> On 2010-03-05, Bill Moran <wmoran@collaborativefusion.com> wrote:
>
> >     <target name="test-lib" depends="compile-tests">
> >         <junit printsummary="withOutAndErr" fork="yes" forkmode="perTest"
> >          timeout="10000" maxmemory="512m" haltonfailure="no"
> >          tempdir="/tmp" failureProperty="test.failure">
>
>
> > Unfortunately, this doesn't give me any output anywhere.
>
> withOutAndErr should give you the output in most cases.
>
> Since you are forking the process the output may get buffered inside the
> forked VM and if a timeout occurs this forked VM is killed without the
> buffer being cleared.  The same is true if the forked VM crashes (runs
> out of memory, for example).
>
> To make sure you get all output of your tests into Ant's logging system
> as they occur (rather than only to the formatters once a test is
> finished) set the task's showOutput attribute to true.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message