Optimizing integration tests with Clover

I have the following profile set up to optimize my integration tests, yet every test is run every time when I run "mvn verify -Pclover-optimize." What am I doing wrong?

<profile>

<id>clover-optimize</id>

<build>

<plugins>

<plugin>

<groupId>com.atlassian.maven.plugins</groupId>

<artifactId>maven-clover2-plugin</artifactId>

<executions>

<execution>

<goals>

<goal>setup</goal>

<goal>optimizeIntegration</goal>

<goal>snapshot</goal>

</goals>

<configuration>

<optimizeIncludes>

<optimizeInclude>**/IT*.java</optimizeInclude>

<optimizeInclude>**/*IT.java</optimizeInclude>

<optimizeInclude>**/*ITCase.java</optimizeInclude>

</optimizeIncludes>

</configuration>

</execution>

</executions>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-plugin</artifactId>

<configuration>

<argLine>-Xmx1536m -XX:MaxPermSize=384m</argLine>

</configuration>

<executions>

<execution>

<id>integration</id>

<phase>integration-test</phase>

<goals>

<goal>test</goal>

</goals>

<configuration>

<includes>

<include>**/IT*.java</include>

<include>**/*IT.java</include>

<include>**/*ITCase.java</include>

</includes>

</configuration>

</execution>

</executions>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-failsafe-plugin</artifactId>

<configuration>

<skip>true</skip>

</configuration>

</plugin>

</plugins>

</build>

</profile>

1 answer

0 vote

Hi Heather, I took your configuration and it's correct (Clover indeed optimizes tests). Could you provide more data, like build log, code sample?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 3 hours ago in Hipchat

Moving from Hipchat to Stride? Here’s what you’ll love

Heya, Hipchat friends! We’re so happy you’re checking out   Stride. Whether you know it or not, you have been instrumental in making Stride come to life. Every feature, design, and functionality...

15 views 0 1
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you