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.
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.
Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG