Greetings,
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?
Thanks,
Mark
Hi,
clover.initstring
will be resolved at runtime so modifying catalina.sh
should be enough. There's probably more options to configure this system property, e.g. with setting JAVA_OPTS
or CATALINA_OPTS
environment variables. Please refer to Tomcat documentation for more information about this. initstring
property.
Best regards,
Grzegorz Lewandowski
Hello again,
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...
Thanks again!
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
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.
Cheers,
Grzegorz Lewandowski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Grzegorz,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Mark,
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.
For reference:
https://confluence.atlassian.com/display/CLOVER/Using+Clover+in+various+environment+configurations
If you'll be facing any problems with Clover configuration, please feel free to ask.
Cheers,
Grzegorz Lewandowski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.