I'm using Jenkins and maven to build a Clover-instrumented war file that is deployed on one machine - this is all done in one Jenkins job using maven.
Once the war is deployed and the application is started, I use another Jenkins job to run our regression tests. The Jenkins test job runs on a different machine and when it execute the clover2:aggregate clover2:clover steps in maven, there's no clover db found locally
I'm relatively new to Clover, is there a way to use or specify remote Clover dbs?
Clover DB is created during instrumentation, so you have to ensure manually existence of Clover db generated during
clover2:setup on the second machine, you can just copy it or share via some network drive.
On the second machine for you should specify the location of the Clover DB initstring property for the regression test and Clover goals.
If the test coverage files won't appear in the same (initstring) location please refer to Clover flush policy.
If you'll be facing any problems with Clover configuration, please feel free to ask.
Thank you very much for the info! Here's where I am with clover on the test machine...
[WARNING] No Clover database found, skipping report generation
[INFO] No report being generated for this module.
Here's the maven command line I'm using:
mvn -U clean test -Dmaven.clover.licenseLocation=/path/to/clover.license -Dclover.initstring=/path/to/clover.db -Dtype=NAV -Denv=LOCAL -Dlocalurl=http://mytest.site.org -Dmaven.test.failure.ignore=true clover2:aggregate clover2:clover
I don't believe I should be getting this message. I'm specifying an absolute path to the clover.db file.
What am I doing wrong?
To verify that clover is configured correctly, where should I look for the generated files?
I should add that I'm 'forced' to use version 3.0.5 of the plugin.
Thanks in advance.
Sorry, I miss-understood a little bit the whole configuration. So I assume the testing env you're having is similar to this:
Please correct me if I'm wrong.
I would like to prepare your environment configuration with Clover in several steps:
Step #1 - recording code coverage for application code only
Assuming that your tests are written in Java or Groovy (JUnit, TestNG, Spock), you can configure even more:
Step #2 - recording code coverage for application code as well as coverage and test results for your test classes
Step #3 - tracking per-test code coverage of your application
I'll guide you further as soon as Step #1 is achieved.
Note: Clover 3.0.5 is quite old and not supported anymore, I strongly recommend to upgrade to the newest version. Especially Clover 4.0+ have completely redesigned HTML report.
Thanks again for your time and the great detailed answer. The environment that I have to deal with is pretty much as you described, the only small difference is that machine A and machine B are one of the same.
The job that builds and deploys the application occurs on the same machine (machine A = machine B).
So two more questions...
clover.initstringwill be resolved at runtime so modifying
catalina.shshould be enough. There's probably more options to configure this system property, e.g. with setting
CATALINA_OPTSenvironment variables. Please refer to Tomcat documentation for more information about this.
We’re excited to invite you to this action-packed webinar where we will demonstrate how to integrate Opsgenie’s powerful alerting and on-call management tools with your entire Atlassian stack. Mar...
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