I know that Clover can be used for unit tests in a Maven build. The tests are executed by the Maven Surefire Plugin. However, I need to use Clover for integration tests, which are executed by the Maven Failsafe Plugin. Is this possible? Please advise. Thanks.
Hi David,
Sure, it is possible to use Clover with the Maven Failsafe Plugin.
However, you have to remember about few differences between Failsafe and Surefire:
Therefore you have to reconfigure Clover in pom.xml:
Optionally, if you wish to have a consolidated Clover report for both Surefire and Failsafe run:
I have prepared a sample project showing Surefire and Failsafe usage. Go to the https://bitbucket.org/atlassian/maven-clover2-plugin, clone this repository, go to the src/it/surefire-and-failsafe-plugins folder and run mvn command with goals as specified in goals.txt file.
See also:
Regards
Marek
I've created an official manual out of this post:
http://confluence.atlassian.com/display/CLOVER/Using+with+Surefire+and+Failsafe+Plugins
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.