views:

119

answers:

2

Id like to see stacktrace of unit tests in console, does surefire support this?

+8  A: 

You can use the following command to see the stack trace on console instead of report files in the target/surefire-reports folder:

mvn -Dsurefire.useFile=false test
Eugene Kuleshov
+1  A: 

To extend the answer given before, you also can configure this behavior in your pom.xml:

..
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.5</version>
  <configuration>
    <useFile>false</useFile>
  </configuration>
</plugin>
..
Vincenzo