Clover - Test Run Explorer dashboard is empty

Verand December 1, 2013

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 votes
Answer accepted
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 2, 2013

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 votes
Verand December 5, 2013

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!

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 4, 2013

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.

0 votes
Verand December 4, 2013

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 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 4, 2013

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:

0 votes
Verand December 4, 2013

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 votes
Verand December 4, 2013

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

0 votes
Verand December 1, 2013

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.

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2013

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?

0 votes
Verand December 1, 2013

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 votes
Verand December 1, 2013

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 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2013

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events