Clover Code Coverage - remote server

Hi ,

I am trying to generate code coverage report without restarting the server. 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" />
</target>
<!-- 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!!

1 answer

0 votes
  1. What is mergeddb are you using merge task to merge multiple Clover databases into one ?
  2. Could you run that JBoss with Clover debugging enabled ? You have to specify the following JVM property:

    -Dclover.logging.level=debug 

    And look for similar strings in the logs:

    Started active flush thread for registry at ***DB PATH*** with interval=500

    And

    [flushed recorder ***filepath*** ***timestamps***]

    If you encounter the following:

    Added shutdown hook for registry at ***DB PATH***

    It means that the flush policy wasn't recognized during runtime. You can also attach the log files here to let us analyze it further. If you are worried about data confidentiality you can rise an support request using https://support.atlassian.com 

  3. How are you deploying builded artifact to JBoss and when exactly ?

 

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

248 views 0 11
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot