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.
Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events