Fundamental question for using code coverage with clover

Hello All,

I am new to using clover tool and have some specific questions on code coverage using clover.

I have a separate machine from where I have run my automated functional tests and this machine will be configured to connect to other specific machnies via shm proxy. I am assuming that once I have clover.db with has reference to all of the source code that is installed in other machines that my test machine is configured to talk to can I do the folloiwng:

1) I can port the clover.db to my test machine where I will be running my testNG suites

2) Add clover.jar to teh class path and run my testNG suites and clover_html file will be generated

3) Then as a final step run the following command to get clover reports:

java com.cenqua.clover.reporters.html.HtmlReporter -i clover.db -o clover_html

Can somebody confirm if these steps are valid?

Thanks

1 answer

1 accepted

In principle, that's about it. See http://confluence.atlassian.com/display/CLOVER/Clover+Command+Line+Tools

To use the tools in your build system, the synopsis is:

  1. Copy and instrument your source files using CloverInstr.
  2. Compile the instrumented source files using a standard java compiler.
  3. Execute your tests using whatever framework.
  4. (Optional) If you have multiple separate coverage databases, merge them using CloverMerge.
  5. Use either the XmlReporter, HtmlReporter , PDFReporter or ConsoleReporter to view the measured coverage results.

But why are you using command line tools ? There's a nice ant / maven integration for clover.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Thursday in Off-topic

Friday Fun: Magic Eyes

...staring into the background. Once the image pops out in 3D, you can look around the picture and enjoy. If you will see if you are a true illusion master! :) You did it? :) Wow! Awesome! As a bonus...

461 views 83 11
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