Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.10, 2.11, 2.12
-
None
-
tested on Windows XP + JDK 1.6.29 and Linux (2.6.32) JDK 1.6.24, Maven 2.2.1
Description
I'm using a trivial test using SpringJUnit4ClassRunner (RedirectTest.java).
The test prints a simple message to the standard output. I run the test with "mvn test" command.
When log4j is configured to print some spring execution details (logger set to level INFO) the RedirectTest-output.txt file is empty.
To reproduce:
unzip "redirect.zip" file
run "mvn test"
confirm that the file target/surefire-reports/RedirectTest-output.txt is empty
Optionally: edit pom.xml file, change maven-surefire-plugin version to 2.9 .
run "mvn test"
confirm that the file target/surefire-reports/RedirectTest-output.txt is not empty. See attached RedirectTest-output.txt captured using maven-surefire-plugin version 2.9.