Search code examples
mavenjunitmaven-failsafe-plugin

maven-failsafe-plugin: how to pass option to JUnit?


I use maven-failsafe-plugin to run my integration tests. When it fails, I see full stack trace. For each failed test case it may has about ~50 lines, most of which are related to Junit. I found that Junit has filtertrace option which allows to strip part of stack trace, but I cannot figure out how to pass this option to Junit?

Also I tried trimStackTrace option of maven-failsafe-plugin but it doesn't changed output of failed tests.

Is it possible to pass filtertrace option from plugin to Junit? (without using maven-antrun-plugin or similar plugins.)


Solution

  • maven-failsafe-plugin (and maven-surefire-plugin) contains bug when trimStackTrace has no effect on JUnit 4.x It fixed in version 2.13, so in my case i should update plugin to newer version.