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

This widget could not be displayed.
  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 Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 56m ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

18 views 0 3
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