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?
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.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I assume that you have two JVMs running:
Am I correct? In such case, you have to configure a distributed coverage:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marek,
Please find my answers below:
[I am building it using Eclipse]
[I am seeing test contributions in "Test Contributions" view in Eclipse.]
[No. I dont see test results in the "Test Run Explorer" view in Eclipse]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marek,
Please find my answers below:
[I am building it using Eclipse]
[I am seeing test contributions in "Test Contributions" view in Eclipse.]
[No. I dont see test results in the "Test Run Explorer" view in Eclipse]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Verand,
Cheers
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.