How do I get coverage records after deploying and running the application?

Hello All,

We have a standalone application deployed on a different machine and the application jar (excluding the dependent jars) is instrumented using gradle.

We call the ant.clean followed by setup and then use javac to compile and the gradle nebula.rpm plugin to create an RPM.

This RPM is then deployed on a different machine where the clover.db file is copied and the path is set as JVM argument using -Dclover.initstring=path/to/clover.db.

However, when we run the tests, we see no coverage data in the path where clover.db is located(supplied via the init string)

We are not able to get any clover logs even after setting the JVM arguments for the same in order to debug and our application logs do not indicate any exceptions.

Steps ensured -

1. clean is called before setup task and then followed by compilation.(all done through gradle's ant builder)

2. Generated jar file was exploded and the resulting class files were decompiled to make sure that they were instrumented.

3. clover.jar is in the classpath of the application when we run the application(included the same under lib directory and also made sure that this path is made available using -classpath java option)

4. Init String is provided to the JVM as an argument at runtime.


Can anyone help us proceed further? If anyone can help provide information regarding how to generate clover logs, it would be help to debug this further from our end.



2 answers

0 votes

The only thing which come to my mind is the fact that coverage data might not be flushed to hard drive. How do you stop an application JVM  with Clover ?

Note it needs to be gracefully shutdown (e.g by kill -15) otherwise parts or all coverage data will be lost.  (Clover uses JVM shutdown hook and when JVM is killed those aren't invoked at all)

Beside that and the steps you've already mentioned I don't have any ideas why Clover might not work properly. But I don't know what exactly does it mean to package classes to RPM file and deploy it to JVM. (I don't know how to run RPM package in JVM). That solution might not work with Clover. 

You can also change a flush policy to "interval" or "threaded".


Using Ant: 

<clover-setup flushPolicy="interval" flushInterval="500">
<clover-instr flushPolicy="interval" flushInterval="500">


Using Maven:






Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Jan 15, 2019 in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

304 views 5 2
Join discussion

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