You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sankara Rameswaran <sa...@gmail.com> on 2007/04/05 12:36:09 UTC

Junit: maven-test-plugin: System.out not going to the .txt or .xml file

I'm using maven-test-plugin to run my junit test cases. I can see that the
output from junit e.g the summary, the exception thrown when an assertion
fails ...etc are going to the corresponding .txt and .xml file. But the
output of System.out.println is always going to the console and not to the
respective file.
I need to generate a report of my test runs and of course as you know it
would be a lot simpler to debug if all the debug logs that i emit iare also
available for the person who look at the failures.

// I don't use log4j/any other logger in my code anywhere. I cannot use an
IDE to run the test cases as the test-cases will automatically run everyday
through a cron job.
// I searched the archive exhaustively I can see the exact opposite of the
problem, people searching where their logs went.

I would like to know if i'm missing something.

The exact commands i'm running:

$maven test:test -Dmaven.test.skip=false -Dmaven.test.error.ignore=true -
Dmaven.test.failure.ignore=true -Dmaven.test.usefile=true
$maven junit-report:report
$maven xdoc


Thanks,
Sankara