You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Collins <st...@ifactor-e.com> on 2000/09/13 16:15:22 UTC

Junit and std console output

Is there a way to send the output of the JUnit tests to standard out
rather than to a file without writing your own Formatter?  Didn't see
how from the code.
Thanks



Re: Junit and std console output

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "SC" == Steve Collins <st...@ifactor-e.com> writes:

 SC> Thank you.  I would like to have the ability to send it to
 SC> stdout.  Does this sound like something that will be added or
 SC> should I modify the code?

I should have been clearer.

If you say

<formatter type="plain" usefile="false" />

you will get the output to stdout right now - speaking of CVS.

 SC> Stefan Bodewig wrote:

 >> Note that my previous patch that moved task configuration to
 >> runtime has broken the way the <junit> task provided defaults to
 >> the nested <test> and <batchtest> elements (for the fork attribute

Has been fixed in CVS as well.

 SC> Also, on a different issue I get the misleading error:

 SC> Could not create task of type: junit because I can't find it in
 SC> the list of task class definitions

Why is this misleading? Have you compiled Ant including <junit>
yourself? Neither Ant 1.1 nor the nightly builds contain it AFAIK.

Stefan

Re: Junit and std console output

Posted by Steve Collins <st...@ifactor-e.com>.
Stefan Bodewig wrote:

> >>>>> "SC" == Steve Collins <st...@ifactor-e.com> writes:
>
>  SC> Is there a way to send the output of the JUnit tests to standard
>  SC> out
>
> Hasn't been, no - all formatters have always written the output to a
> file. I've added an usefile attribute to <formatter> that let's you
> override this.
>
> Note that my previous patch that moved task configuration to runtime
> has broken the way the <junit> task provided defaults to the nested
> <test> and <batchtest> elements (for the fork attribute for
> example). I'm going to fix that ASAP.
>
> Stefan

Thank you.  I would like to have the ability to send it to stdout.  Does
this sound like something that will be added or should I modify the
code?

Also, on a different issue I get the misleading error:
-------------------------------------------------------------------
"Buildfile: build.xml

BUILD FAILED

Could not create task of type: junit because I can't find it in the list
of task class definitions

--------------------------------------------------------------------
The error appears not when JUNIT is missing from the list of task class
definitions but when junit is not in my CLASSPATH.

Thanks, Steve





Re: Junit and std console output

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "SC" == Steve Collins <st...@ifactor-e.com> writes:

 SC> Is there a way to send the output of the JUnit tests to standard
 SC> out

Hasn't been, no - all formatters have always written the output to a
file. I've added an usefile attribute to <formatter> that let's you
override this.

Note that my previous patch that moved task configuration to runtime
has broken the way the <junit> task provided defaults to the nested
<test> and <batchtest> elements (for the fork attribute for
example). I'm going to fix that ASAP.

Stefan