Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Clover as code coverage tool to run on remote system.


I want attach a code coverage tool against code that can be executed on remote systems which can provide metrics on a regular basis, either at build time or weekly. Also it should be automated within Jenkins jobs either triggered at build time, deploy time or at some regular interval.

Please advice whether we are capable of measuring the code coverage of the remote Application in this case using Clover.

3 answers

Hi Rocky,

can be executed on remote systems

Could you please specify what do you mean by "executed on remote systems". I'm asking, because Clover supports measuring code coverage of distributed applications, but I'd like to ensure that we have the same understanding of the "remote" term.

can provide metrics on a regular basis, either at build time or weekly

Clover must run during a build in order to measure code coverage and to generate reports. You can later access these reports at any time. Some customers also integrate Clover with Sonar.

it should be automated within Jenkins jobs either triggered at build time, deploy time or at some regular interval.

It's up to you how you'd like to configure Jenkins jobs.



Hi Marek,

Thanks for reply. We want to measure code coverage of web service that is running on remote server. So we need a code coverage tool that can run on remote system and provide us with metrics.

Also please give me the information on how to setup the whole installation process.



Hi Rocky, there's no single page for this, I'm afraid. I'd like to suggest to read the following articles: * - how to measure code coverage in web applications in general * - there are many deployment options, you may look for one which fits best your needs * - in case you got stuck at some point

Hi Rocky,

Shortly speaking what you have to do is:

  • compile your web app with Clover (to have classes instrumented by Clover)
    • optional: use 'threaded' or 'interval' flush policy to have coverage data being written to disk continuously; thanks to this you will not need to shut down application server
  • deploy web app to remote server
    • ensure that clover.db file(s) is copied as well as Clover needs it at runtime
    • ensure that clover.jar is available on class path (bundle it into WEB-INF/lib or put into application server's /lib directory)
  • run your tests; as soon as application starts, Clover will write coverage files to disk
  • after tests are finished:
    • optional: shut down your application server if you did not use 'threaded' or 'interval' flush policy
    • copy coverage recording files (clover.db*) back to your build machine
    • run report generation


Hi Marek,

I have followed the same steps what you have described in previous post. In my case I have multi module ant project. In each project I have added following in the build.xml file:


<!-- Clover Setup -->
<property name="clover.jar" location="../javalibs/clover-4.0.4.jar"/>
<property name="coverage.results.dir" location="D:\installed\Atlasian\clover\mergeddb"/>
<property name="coverage.flush.interval" value="1000"/>

<taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>

<property name="coverage.db" value="${coverage.results.dir}/coverage.db"/>

<target name="with.clover" >
<clover-setup initstring="${coverage.db}" flushpolicy="interval" flushinterval="500" />
<!-- Clover Setup -->

I am compiling all the projects using following ant command:

ant clean with.clover jar

It is creating coverage.db file in specified location.

Then I am starting my jboss application server with following command

run.bat -Dclover.initstring.basedir=D:\installed\Atlasian\clover\mergeddb

Then I am executing my unit test cases. JBOSS lib folders contains clover jar file.

I want to generate colver recorder files without shutting down the jboss server. But recorder files getting generated only when I am shutting down the jboss application server. 


Please help!!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Trello

What is a Trello board?

Hi, Atlassian Community! My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. I'll be sharing with you a series of videos with my top tips on how to best use Trel...

24 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you