Can maven surefire plugin run multiple test executions when invoked directly? (Sonar + Jenkins not running all unit tests) Can maven surefire plugin run multiple test executions when invoked directly? (Sonar + Jenkins not running all unit tests) jenkins jenkins

Can maven surefire plugin run multiple test executions when invoked directly? (Sonar + Jenkins not running all unit tests)


I am thinking that perhaps my Jenkins setup should change, so that the unit tests are run in the normal build action, which generates code coverage reports, and then the Sonar plugin runs as a post-build action and loads these reports to perform analysis.

That seems like a good idea. You could use maven profiles to do this. You can configure the surefire plugin in different profiles and make the one you want your tools to use active by default.