You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bogdan Calmac <bc...@gmail.com> on 2010/08/31 21:05:50 UTC

Surefire - can you print TestNG results to stdout?

In the old ant world, the testng plugin would print the test results to
stdout (in addition to the HTML report). This was very convenient when
running the build from eclipse; I could see the failures right in the
console window and click on the links for stacktraces.

In contrast, the surefire plugin does not print any test results to stdout,
so I have to go through this tedious workflow:
 - run "maven test" from eclipse 
 - browse to the target\surefire-reports directory and open index.html
 - browse through the HTML pages down to the failing test
 - copy the stacktrace from the browser and paste it in the eclipse "Java
StackTrace Console"
 - finally get to the failing code

Is there any way to configure the surefire plugin to print the test results
(including stacktraces) to stdout?
-- 
View this message in context: http://maven.40175.n5.nabble.com/Surefire-can-you-print-TestNG-results-to-stdout-tp2798556p2798556.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Surefire - can you print TestNG results to stdout?

Posted by Sridhar Laxmipuram Srinivasan <sr...@yahoo-inc.com>.
Configure log4j to print on console, that's the ideal way of printing data transactions on console

Thnkx
sridharl

-----Original Message-----
From: Bogdan Calmac [mailto:bcalmac@gmail.com] 
Sent: Wednesday, September 01, 2010 10:24 PM
To: users@maven.apache.org
Subject: Re: Surefire - can you print TestNG results to stdout?


redirectTestOutputToFile is false by default so the output already goes to
the console, just as I want. However this does not include the test results.

The solution is useFile=false (I missed this).

However, this is a misnomer, it should be called enableConsoleTestResults,
because the HTML test results are created anyway, irrespective of the value
of useFile (according to my tests).

Also, I think that it should print the test results to stdout by default.
It's a lot more likely to want to see the test results in the console than
considering it as too much info and disabling it. For me at least, the test
results are this only thing I care about when I run "mvn test".
-- 
View this message in context: http://maven.40175.n5.nabble.com/Surefire-can-you-print-TestNG-results-to-stdout-tp2798556p2799607.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Surefire - can you print TestNG results to stdout?

Posted by Bogdan Calmac <bc...@gmail.com>.
redirectTestOutputToFile is false by default so the output already goes to
the console, just as I want. However this does not include the test results.

The solution is useFile=false (I missed this).

However, this is a misnomer, it should be called enableConsoleTestResults,
because the HTML test results are created anyway, irrespective of the value
of useFile (according to my tests).

Also, I think that it should print the test results to stdout by default.
It's a lot more likely to want to see the test results in the console than
considering it as too much info and disabling it. For me at least, the test
results are this only thing I care about when I run "mvn test".
-- 
View this message in context: http://maven.40175.n5.nabble.com/Surefire-can-you-print-TestNG-results-to-stdout-tp2798556p2799607.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Surefire - can you print TestNG results to stdout?

Posted by Wim Deblauwe <wi...@gmail.com>.
Have you tried configuring this?

http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#redirectTestOutputToFile
<http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#redirectTestOutputToFile>

2010/8/31 Bogdan Calmac <bc...@gmail.com>

>
> In the old ant world, the testng plugin would print the test results to
> stdout (in addition to the HTML report). This was very convenient when
> running the build from eclipse; I could see the failures right in the
> console window and click on the links for stacktraces.
>
> In contrast, the surefire plugin does not print any test results to stdout,
> so I have to go through this tedious workflow:
>  - run "maven test" from eclipse
>  - browse to the target\surefire-reports directory and open index.html
>  - browse through the HTML pages down to the failing test
>  - copy the stacktrace from the browser and paste it in the eclipse "Java
> StackTrace Console"
>  - finally get to the failing code
>
> Is there any way to configure the surefire plugin to print the test results
> (including stacktraces) to stdout?
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Surefire-can-you-print-TestNG-results-to-stdout-tp2798556p2798556.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>