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.
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".
<clover-setup flushPolicy="interval" flushInterval="500">
<clover-instr flushPolicy="interval" flushInterval="500">
Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...
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!
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot