Can't measure coverage using merged database

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Several Clover databases created during instrumentation are merged into one. Next such merged database is used to run instrumented application. During application startup a following message appears:

ERROR: CLOVER: Unable to load coverage database.
ERROR: CLOVER: No coverage data will be gathered.
ERROR: CLOVER: com.cenqua.clover.registry.ReadOnlyRegistryException
ERROR: CLOVER: This database can only be used for reporting because it 
is the result of a merge. It does not support further coverage 
gathering.

 

Cause

It is possible to merge several Clover databases into one in order to have a single coverage report. However, such merged database becomes 'read-only' and cannot be used for further code coverage gathering.

 

Resolution

Use original non-merged databases for execution of application module(s).

 

Alternatively, it's possible to create a single database for several application modules during instrumentation and use just one database at runtime:

  • in Maven use the <singleCloverDatabase> parameter
  • in Ant setup Clover in master build file and make sure that inheritrefs="true" is used across ant calls.

 

Last modified on Dec 8, 2012

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.