Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Integration Tests showing in Application Code after Clover Merge

Raviraj Raikar October 22, 2019

I have two separate micro-services/application. When i run the clover report using maven command clean clover:setup verify clover:aggregate clover:clover" for each of the application individually, the report generates fine with the Integration Test included in the Test Code i.e. both *IT.java & *Test.java, and the application code properly defined in the application code.

But now when i run the clover merge using the command mvn clean clover:merge clover:clover the integrations Tests which ends with *IT.java gets included in the application code and not the Test Code. Test Code only includes *Test.java

How to fix this problem, to have integration tests *IT.java separated from application code and moved to the Test Code.

 

 <plugin>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<version>${clover-maven-plugin.version}</version>
<configuration>
<cloverMergeDatabase>${clover-reports-base-dir}/merge/clover.db</cloverMergeDatabase>
<baseDir>${clover-reports-base-dir}</baseDir>
<includes>**/*.db</includes>
</configuration>
</plugin>

1 answer

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 16, 2019

If you run `mvn clean clover:merge clover:clover` the `clean` command wipes out the `target` directory. Which means that all instrumented classes and JARs as well as clover.db and recording files files are removed. 

You shall probably run sth like:

`mvn clean clover:setup verify clover:aggregate clover:clover`

or

`mvn clean clover:setup verify clover:merge clover:clover.

 

Note: the clover:aggregate goal makes basically the same as clover:merge (it merges databases into one). The only difference is that the first one searches for files based on modules executed in the maven reactor, while the second one searches for files in a given directory (and sub-directories).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events