You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Yiu Wing <yi...@virgin.net> on 2002/03/03 18:57:36 UTC

A consice ouput for failed JUint task

Hello All,

I've got a JUint task in the build file.  But every time when the test
fails, ant writes out a big chunk of error messages to the screen.  Whereas
the native JUnit error messages prints out the line in the source code where
the test fails and a couple of lines for the summary.  I've looked up the
docs, but I couldn't find a way to make ant to output the original message
from JUnit.  I suppose I could use an exec task but that would defeat the
purpose of the JUnit task.

Could someone shed light on my build file?  The following is the snippet for
JUnit task

 <target name="runtest" depends="compiletest">
  <junit dir="${build}/test" fork="yes" printsummary="yes"
haltonfailure="yes">
   <test name="AllJUnitTests" haltonfailure="yes" outfile="testResult"/>
   <!-- set usefile to "yes" to redirect output to the outfile -->
   <formatter usefile="yes" type="plain"/>
   <classpath refid="test.classpath"/>
  </junit>
 </target>

Thanks for the help.

Yiu Wing


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: A consice ouput for failed JUint task

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Yiu Wing" <yi...@yahoo.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Sunday, March 03, 2002 3:46 PM
Subject: Re: A consice ouput for failed JUint task


> > An enhancement was made to reduce the stack trace to only the non-JUnit
> > classes.  It is part of the CVS codebase and nightly builds of 1.5alpha.
> >
> > Is that the output you want reduced?  If not, send us the output you're
> not
> > liking.
>
> Hi Erik,
>
> Thanks for the response.  Yeah, I've found the output too verbose and
would
> like it to be reducued.  I'm not very interested in the stack trace for
> JUint classes, probably most people aren't, either.  Sometimes I get quite
> fracstrated to figure out where exactly the test fails from the output.


name your test cases more meaningfully and do less per test. If you have
commonality in tests, refactor it out.

its much easier to deal with testUpdateToDBofOddNumber() failed than
testDB() failure




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: A consice ouput for failed JUint task

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
I usually run <junit> this way:

    <junit printsummary="no"
           fork="${junit.fork}">
.
.
.
      <formatter type="xml"/>
      <formatter type="brief" usefile="false"/>
.
.
.

   </junit>

This should give you much reduced output, I believe.  And even more so in a
nightly build.

    Erik

----- Original Message -----
From: "Yiu Wing" <yi...@yahoo.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Sunday, March 03, 2002 6:46 PM
Subject: Re: A consice ouput for failed JUint task


> > An enhancement was made to reduce the stack trace to only the non-JUnit
> > classes.  It is part of the CVS codebase and nightly builds of 1.5alpha.
> >
> > Is that the output you want reduced?  If not, send us the output you're
> not
> > liking.
>
> Hi Erik,
>
> Thanks for the response.  Yeah, I've found the output too verbose and
would
> like it to be reducued.  I'm not very interested in the stack trace for
> JUint classes, probably most people aren't, either.  Sometimes I get quite
> fracstrated to figure out where exactly the test fails from the output.
>
> Regards,
>
> Yiu Wing
>
> >     Erik
> >
> >
> > ----- Original Message -----
> > From: "Yiu Wing" <yi...@virgin.net>
> > To: "Ant Users List" <an...@jakarta.apache.org>
> > Sent: Sunday, March 03, 2002 12:57 PM
> > Subject: A consice ouput for failed JUint task
> >
> >
> > > Hello All,
> > >
> > > I've got a JUint task in the build file.  But every time when the test
> > > fails, ant writes out a big chunk of error messages to the screen.
> > Whereas
> > > the native JUnit error messages prints out the line in the source code
> > where
> > > the test fails and a couple of lines for the summary.  I've looked up
> the
> > > docs, but I couldn't find a way to make ant to output the original
> message
> > > from JUnit.  I suppose I could use an exec task but that would defeat
> the
> > > purpose of the JUnit task.
> > >
> > > Could someone shed light on my build file?  The following is the
snippet
> > for
> > > JUnit task
> > >
> > >  <target name="runtest" depends="compiletest">
> > >   <junit dir="${build}/test" fork="yes" printsummary="yes"
> > > haltonfailure="yes">
> > >    <test name="AllJUnitTests" haltonfailure="yes"
outfile="testResult"/>
> > >    <!-- set usefile to "yes" to redirect output to the outfile -->
> > >    <formatter usefile="yes" type="plain"/>
> > >    <classpath refid="test.classpath"/>
> > >   </junit>
> > >  </target>
> > >
> > > Thanks for the help.
> > >
> > > Yiu Wing
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: A consice ouput for failed JUint task

Posted by Yiu Wing <yi...@yahoo.com>.
> An enhancement was made to reduce the stack trace to only the non-JUnit
> classes.  It is part of the CVS codebase and nightly builds of 1.5alpha.
>
> Is that the output you want reduced?  If not, send us the output you're
not
> liking.

Hi Erik,

Thanks for the response.  Yeah, I've found the output too verbose and would
like it to be reducued.  I'm not very interested in the stack trace for
JUint classes, probably most people aren't, either.  Sometimes I get quite
fracstrated to figure out where exactly the test fails from the output.

Regards,

Yiu Wing

>     Erik
>
>
> ----- Original Message -----
> From: "Yiu Wing" <yi...@virgin.net>
> To: "Ant Users List" <an...@jakarta.apache.org>
> Sent: Sunday, March 03, 2002 12:57 PM
> Subject: A consice ouput for failed JUint task
>
>
> > Hello All,
> >
> > I've got a JUint task in the build file.  But every time when the test
> > fails, ant writes out a big chunk of error messages to the screen.
> Whereas
> > the native JUnit error messages prints out the line in the source code
> where
> > the test fails and a couple of lines for the summary.  I've looked up
the
> > docs, but I couldn't find a way to make ant to output the original
message
> > from JUnit.  I suppose I could use an exec task but that would defeat
the
> > purpose of the JUnit task.
> >
> > Could someone shed light on my build file?  The following is the snippet
> for
> > JUnit task
> >
> >  <target name="runtest" depends="compiletest">
> >   <junit dir="${build}/test" fork="yes" printsummary="yes"
> > haltonfailure="yes">
> >    <test name="AllJUnitTests" haltonfailure="yes" outfile="testResult"/>
> >    <!-- set usefile to "yes" to redirect output to the outfile -->
> >    <formatter usefile="yes" type="plain"/>
> >    <classpath refid="test.classpath"/>
> >   </junit>
> >  </target>
> >
> > Thanks for the help.
> >
> > Yiu Wing
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: A consice ouput for failed JUint task

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
An enhancement was made to reduce the stack trace to only the non-JUnit
classes.  It is part of the CVS codebase and nightly builds of 1.5alpha.

Is that the output you want reduced?  If not, send us the output you're not
liking.

    Erik


----- Original Message -----
From: "Yiu Wing" <yi...@virgin.net>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Sunday, March 03, 2002 12:57 PM
Subject: A consice ouput for failed JUint task


> Hello All,
>
> I've got a JUint task in the build file.  But every time when the test
> fails, ant writes out a big chunk of error messages to the screen.
Whereas
> the native JUnit error messages prints out the line in the source code
where
> the test fails and a couple of lines for the summary.  I've looked up the
> docs, but I couldn't find a way to make ant to output the original message
> from JUnit.  I suppose I could use an exec task but that would defeat the
> purpose of the JUnit task.
>
> Could someone shed light on my build file?  The following is the snippet
for
> JUnit task
>
>  <target name="runtest" depends="compiletest">
>   <junit dir="${build}/test" fork="yes" printsummary="yes"
> haltonfailure="yes">
>    <test name="AllJUnitTests" haltonfailure="yes" outfile="testResult"/>
>    <!-- set usefile to "yes" to redirect output to the outfile -->
>    <formatter usefile="yes" type="plain"/>
>    <classpath refid="test.classpath"/>
>   </junit>
>  </target>
>
> Thanks for the help.
>
> Yiu Wing
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>