Clover - Test Run Explorer dashboard is empty

Hi,

I installed clover evaluation version with eclipse. I was able to see code coverage for my project (Java with maven).

Also, I see

a) server classes marked green in java editor

b) unit test classes (TestNG) marked green

c) test contribution(s) for each server class

However, test run explorer does not show coverage contribution. Am i missing something here?

12 answers

1 accepted

0 vote

This problem occurs in Clover-for-Eclipse 3.2.0. It's a regression bug, details in CLOV-1391, fix is ready and scheduled for Clover 3.3.0.

Workaround: downgrade to Clover-for-Eclipse 3.1.12.

0 vote

Hi Verand,

  • you wrote "java project with maven" - do you build it using Maven or using Eclipse?
  • on the one hand you wrote that you see test contributions for each server class, but on the other hand that test run explorer is empty - where do you see these test contributions?
  • do you see test results in the "Test Run Explorer" view?

Cheers
Marek

Hi Marek,

Please find my answers below:

  • you wrote "java project with maven" - do you build it using Maven or using Eclipse?

[I am building it using Eclipse]

  • on the one hand you wrote that you see test contributions for each server class, but on the other hand that test run explorer is empty - where do you see these test contributions?

[I am seeing test contributions in "Test Contributions" view in Eclipse.]

  • do you see test results in the "Test Run Explorer" view?

[No. I dont see test results in the "Test Run Explorer" view in Eclipse]

Hi Marek,

Please find my answers below:

  • you wrote "java project with maven" - do you build it using Maven or using Eclipse?

[I am building it using Eclipse]

  • on the one hand you wrote that you see test contributions for each server class, but on the other hand that test run explorer is empty - where do you see these test contributions?

[I am seeing test contributions in "Test Contributions" view in Eclipse.]

  • do you see test results in the "Test Run Explorer" view?

[No. I dont see test results in the "Test Run Explorer" view in Eclipse]

0 vote

May I ask you to create a support ticket at http://support.atlassian.com and attach clover database, coverage files and screen shots from your eclipse?

Marek,

As per your request, I filed a ticket of type Bug. Details can be found at https://jira.atlassian.com/browse/CLOV-1391.

Let me know if you need any updates from me.

Thanks,

Verand.

Marek,

I want to collect per-test coverage from a set of functional automated tests (leveraging JUnit framework) when executed against the web application that is deployed to tomcat. I did the following to achieve the same.
1. Initstring is pointed to Custom value. Also, flushpolicy = threaded.
2. Built the application such that Clover-instrumented (source code only) application has been deployed to tomcat.
3. Executed functional tests. Code coverage has been updated but i could not get the per-test coverage from my functional tests.

Your help is much appreciated here.

-Verand

Marek,

I want to collect per-test coverage from a set of functional automated tests (leveraging JUnit framework) when executed against the web application that is deployed to tomcat. I did the following to achieve the same.
1. Initstring is pointed to Custom value. Also, flushpolicy = threaded.
2. Built the application such that Clover-instrumented (application code only) application has been deployed to tomcat.
4. Copied clover.jar file to tomcat lib folder.
3. Executed functional tests. Code coverage has been updated but i could not get the per-test coverage from my functional tests.

Your help is much appreciated here.

-Verand

0 vote

I assume that you have two JVMs running:

  • one JVM with unit tsets (in your eclipse), these tests calls business code from
  • second JVM with application logic (in tomcat)

Am I correct? In such case, you have to configure a distributed coverage:

Thats correct Marek. I have two JVMs running (one with Unit tests and the other with application logic - tomcat) in my local. I performed following actions to enable distributed coverage:

1. Clover-instrumented application has been deployed to tomcat(localhost:8080). This shall act as a clover client. Passed following JVM argument while starting tomcat:

-Dclover.distributed.coverage=ON (which means Distributed coverage is enabled with:name=clover.tcp.server;host=localhost;port=1198;timeout=5000;numClients=0;retryPeriod=1000)

2. My TestNG test have been instrumented and compiled with Clover. And distributed per-test coverage is configured at runtime as JVM arg in Eclipse while running test. Also -Dclover.server=true has been passed as another argument.

Let me know if additional changes are required.

0 vote

This should be enough.

If you still don't see per-test coverage for your functional tests:

* make sure that Clover "sees" your functional tests as test classes and not the normal classes - you shall see them on the "Tests" tab in HTML report

* make sure that Clover "sees" your test methods - you shall see dark green strip on the left page margin for every test method

If not then it means that your tests are not being recognized by Clover and you'd have to tune instrumentation settings.

If Clover correctly recognizes your functional tests as test classes and you still don't have per-test coverage, then I suggest running both unit tests and tomcat with -Dclover.logging.level=debug. You shall see information about starting coverage recorders and flushing per-test coverage to disk in logs.

Marek,
I am seeing "Tests" tab in HTML report and dark green strip on the left page margin of every test method. But again, I don't see per-test coverage for my funtional tests. I enabled clover logging on both clover-server & clover-client. I have attached logs to https://support.atlassian.com/browse/CLV-6042 if you wanna take a look at them.

Thanks!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

43 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