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

Not able to generate clover reports for integration tests using maven build.

Kalyan Budati January 5, 2018

Hi,

I am running both Unit Tests and Integration Test and attached clover-plugin to both the profiles in my pom. If I run the mvn build for only unit tests, the clover report is getting generated fine. But if I run the mvn build for only Integration tests, then the clover report is not getting generated. Instead, it is throwing the following error in the logs.

[INFO] org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/myfolder/app/target/jetty/webapps/app/WEB-INF/classes/com/myconfig.class]; nested exception is java.lang.NoClassDefFoundError: com_atlassian_clover/TestNameSniffer
[INFO] at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:303)

--------------------

[INFO] org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/myfolder/app/target/jetty/webapps/app/WEB-INF/classes/com/myconfig.class]; nested exception is java.lang.NoClassDefFoundError: com_atlassian_clover/TestNameSniffer
[INFO] at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:303)

 --------------------

Even if I run mvn build to include both Unit and Integration tests together, it is throwing the above error and this time it is not even generating the report for Unit Tests as well. Any help is really appreciated. Note that I also have jacoco plugin for both these profiles in my pom and generating the jacoco report as well parallelly.

1 answer

0 votes
Grzegorz Lewandowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2018

Clover is required in the classpath when code coverage is being gathered.


I don't know how do you run your integration tests but generally speaking, please make sure clover.jar is available in the container. 

 

But note, you probably don't want this dependency in production so make sure it's there only when required (code coverage)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events