• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

0% code coverage using Clover!

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,
I integrated clover into the build.
Enabled instrumentation of the source files while compiling and that went through.
When i run the unit tests, i see 0% code coverage in the clover reports.
While compiling I instrumented the test classes as well. ( I shall switch it off).
But i found that it is reporting the test code that got covered! instead of the code that the tests actually access:
ant runalltests clover.report
runalltests runs all the unit tests while clove.report generated the report.
What am i doing wrong here?
thanks.
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by krithika desai:
All,
I integrated clover into the build.
Enabled instrumentation of the source files while compiling and that went through.
When i run the unit tests, i see 0% code coverage in the clover reports.
While compiling I instrumented the test classes as well. ( I shall switch it off).
But i found that it is reporting the test code that got covered! instead of the code that the tests actually access:

ant runalltests clover.report

runalltests runs all the unit tests while clove.report generated the report.

What am i doing wrong here?
thanks.



I know this is an ancient post, but I've been experiencing the same issues with Clover. The first thing I discovered is that the coverage data doesn't get written until the JVM running the tests complete. This means that you need to either fork the tests or run the report as a seperate Ant job. In some circumstances, which I haven't resolved yet, forking the JUnit tests doesn't fix the problem, but running the report seperately always does.
reply
    Bookmark Topic Watch Topic
  • New Topic