I have a question regarding the way Clover is optimizing the tests that should run during a Maven build.
After a change to some sourcecode only the relevant tests to that change are executed. But what I do not understand is why after a next build Clover still keeps executing those tests. I have the following configuration for Maven:
I execute a Maven build using: mvn integration-test -Pclover
When I run a Maven build using Clover for the first time it correctly produces the following log:
When I run a new Maven build it correctly does not execute any tests according to the following log:
Then after changing some sourcecode it correctly executes the relevant tests accoring to the following log:
So far so good, but when I run a new build without changing sourcecode it still executes the same tests as log3.txt:
I would expect that in log4.txt no tests are executed, because nothing changed in comparison to the previous build. Am I invoking Clover incorrectly or...?
Please note that maven-clover2-plugin has two goals for test optimization:
1) clover2:optimize - which optimizes the 'test' phase
2) clover2:optimizeIntegration - which optimizes 'integration-test' phase
According to log files, you're running the 'integration-test', so please try to use the 'optimizeIntegration' goal.
I saw that guide already, but it doesn't mention the optimizeIntegration goal. Clover reporting of my surefire and failsafe test works fine, but when I try to run clover2:optimizeIntegration it always runs all of the failsafe tests (that is to say, it doesn't appear to optimize with failsafe).
I wasn't precise enough, sorry. :) Clover:
I have corrected sentence in manual.
You can always raise a feature request on https://jira.atlassian.com/browse/CLOV for failsafe test optimization. We'll check if/when it could be done.
Furthermore, as Clover-for-Maven is open-source you are welcome to contribute. :)
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
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs