Den 05.10.2011 18:26, skrev Farrukh Najmi:
Sometime in the recent past I noticed that when I run my projects
junit tests via maven-surefire-plugin I no longer see the log messages
or println statements sent to System.err until *after* the test
completes. Since these message are important while debugging a test I
need to see them as the test executes. I noticed in the debugger that
System.err is redirected to some surefire specific class.
Can any one tell me how I to get back the old behavior where all log
messages and output to System.err is displayed on the console as it
happens in real time?
Thank you for your help.
There were some changes in the capture/buffering algorithm for test
output for surefire 2.9, which might be what you are seeing. If you are
running your tests in parallel,
this is the intended behaviour, but I assume there might have been some
change in the serial run-mode too, which is probably unintentional. This
is not the
kind of stuff our (extensive) test-cases would spot, since the end
behaviour is correct.
I think you should file an issue for this at
http://jira.codehaus.org/browse/SUREFIRE, preferably attaching a small
sample project that demonstrates the problem.
You can use this project as a template for creating an example project
https://svn.apache.org/repos/asf/maven/surefire/trunk/surefire-integration-tests/src/test/resources/junit47-redirect-output*
Kristian
*