3

I'm using cobertura, but it is giving me 100% line coverage. It is showing only those lines of code which are executed?

brian d foy
  • 129,424
  • 31
  • 207
  • 592

2 Answers2

0

Try removing the file cobertura.ser before running the tests.

https://github.com/cobertura/cobertura/wiki/FAQ

Delicia Brummitt
  • 2,160
  • 1
  • 20
  • 23
0

You need to include the sources (or make sure, that they are included), when you use the report task:

<cobertura-report format="html" destdir="${coveragereport.dir}" srcdir="${src.dir}" />

Reference: cobertura-anttask

Otherwise cobertura cannot know, how many lines/classes actually exist and will report 100% coverage.

Community
  • 1
  • 1
oers
  • 18,436
  • 13
  • 66
  • 75