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

Issue with clover on jboss

Hello, I have a server and it is running my app. I want to get the metrics from Clover on remote(distrebuted) testing my application I am testing my application with a browser, after each test, get the files Clover(i e: clover.db5nb4l4_h99zod5p) further generated report using the mvn clover2: clover, resulting in a blank report, ie covering code 0%, what am I doing wrong?

3 answers

0 votes

I'm not sure whether you have a distributed test or not:

  • do you have two (or more) JVMs running your application? do you have <distributedCoverage> feature configured in your build? do you have unit tests running on a different JVM than application under test? if all answers are yes, then it's a Clover's Distributed Coverage feature
  • if your web application is running on single JVM and you perform testing using the web browser then probably it's not a Distributed Coverage feature

What do you exactly mean by "testing application with a browser":

  • manual tests or
  • junits simulating user actions, i.e. there's a chain like: junit (JVM on test machine) -> browser (non-java process) -> application (JVM on JBoss)?

Could you give more details how Clover is configured in your pom.xml?

Thanks for your answer, Accepted my application get requests and answers responses.

I just send requests from the browser. And get response from my app.

My application consists of two modules: webapp and servlet parts, the servlet part loaded into webapp as jar library. In both parts in the pom.xml is written the same clover configuration (is this correct?)

feature of my application is: webapp part is not Java classes used for this module so is therefore not created clover.db (Am I right?)

my clover configuration(for webapp part and server part):



0 votes

Have you seen this manual: Using Clover for web applications? Please note that Distributed Coverage must be enabled only if both conditions are met:

  • tests are being executed in a different JVM than application code called by them (for example JUnits executed during build calls servlets deployed on Tomcat, or EJBs on JBoss) and
  • you're interested in the per-test coverage feature (i.e. which test methods have covered which business methods) or you're interested in the test optimization feature

According to your description, you don't have unit tests but you test the application manually. So first condition is not met.

I propose following modifications in your pom.xml:

  • remove the whole <distributedCoverage> section
  • add flushPolicy (interval or threaded, default is threaded) and flushInterval (default 500ms) - optional

One more thing: how do you copy clover.db to your JBoss installation? I don't see <cloverDatabase> attribute defined in pom.xml. Do you have -Dclover.initstring=/path/to/clover.db declared as JBoss' JVM argument?

Suggest an answer

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

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

176 views 2 9
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