0

sorry, the screenshot upload is broken and I could not manage to properly format the table

Element             Instructions    Branches  Cxty  Lines Methods
getEnv()             212    8%           n/a  0  1   1  1     0 1
getBranch()         1840    68%       31 25%  2  3   0  3     0 1
getSlackChannel()   1840    68%       31 25%  2  3   0  3     0 1
Utilities()           14    0%           n/a  1  1   0  0     1 1
createJob(Object)   1134    75%       35 62%  2  5   0  6     0 1
getTeamEmail()        24    66%          n/a  0  1   0  1     0 1
Total          84 of 204    58%  9 of 16 43%  7 14   1 14     1 6

according to Jacoco the code has 14 lines. one line has no coverage from the getEnv() method which I mocked for testing. For me it is a bit difficult to see how one line missing in coverage weights the overall coverage down to 58%.

I understand that 50% line coverage does not mean 50% test coverage but this? is there a way to configure jacoco to more "civiliced/realisitic" way of calculating code coverage in gradle?

Godin
  • 9,801
  • 2
  • 39
  • 76
moin moin
  • 2,263
  • 5
  • 32
  • 51
  • (204-84)/204=58% is instructions coverage and not line coverage - single line of code contains many bytecode instructions – Godin May 23 '17 at 20:00
  • thank you for this explanation. it was not clear that this means bytecode-coverage. is there a way to configure line coverage? or statement-coverage (groovy-statements) or something more useful since I do not care about bytecode-coverage – moin moin May 24 '17 at 07:19
  • Ignore "Instructions" columns and focus on "Lines" columns ;) – Godin Jul 12 '17 at 21:10

0 Answers0