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

Clover Code Coverage - remote server

Somnath Guha December 10, 2015

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
Grzegorz Lewandowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 14, 2015
  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
TAGS
AUG Leaders

Atlassian Community Events