Search
Calendar
July 2025
S M T W T F S
« Jun    
 12345
6789101112
13141516171819
20212223242526
2728293031  
Archives

PostHeaderIcon Unit Test output redirection onto the console, with Maven 2

Case

You have to build your project. All tests are OK when you run them in your IDE, but one or more unit tests fail when you launch the build with Maven 2. When this happens, you have to open the SureFire tests reports to read the failures details.

But you’d rather read the failure in the standard output. In other terms, you would like the output to be redirected onto the console, and not in log files.

Fix

When you launch the build, specify the following option:

-Dsurefire.useFile=false

Leave a Reply