We are working through adding code coverage to one of our Confluence plugins.
Our first attempt has been with OpenClover and it is proving problematic with our Integration Tests (Unit tests are generating code coverage quite happily)
Clover tests need to have access to classes in clover-runtime.jar to work correctly, but we do not want to add this as a compile dependency as it is only required for our integration tests. Our integration tests are using Arquillian.
We attempted to add clover-runtime.jar as a libArtifact, which copies the jar into WEB-INF/lib correctly, but does not seem to actually expose the classes that the plugin needs. The plugin won’t enable with a ClassDefNotFound error looking for
This is complicated by the fact that confluence bundles an old version of clover-runtime.jar (3.4.1), which may be conflicting in some way?
Basically I have two questions:
- How are other plugin developers measuring code coverage? Should I just take the easy road and get JaCoCo or another library?
- Has anyone managed to get OpenClover working with a Confluence plugin with remote integration tests? If so, what am I missing?
Thanks in advance.