Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding jacoco report

This is a sample jacoco report for a class. I want to understand what these column values mean and what does M and C in each column mean? Also, which is the appropriate column to check the right coverage for a given class and its methods. Should I go with instruction or line coverage? What is the ideal coverage percentage for a class?


Name instruction branch complexity line method


constructor_name M:0 C:4 (100%) M:0 C:0 0% M:0 C:1 100% M:0 C:2 100% M:0 C:1 100% method_name M:0 C:52 (100%) M:0 C:2 100% M:0 C:2 100% M:0 C:9 100% M:0 C:1 100%

Note: I could not upload image as I didn't have enough reputation.

like image 369
Pradeep Kumar T R Avatar asked Oct 30 '22 22:10

Pradeep Kumar T R


1 Answers

As you can see in the following image:

enter image description here

You have: Coverage, Covered Lines, Missed Lines and Total Lines.

I'll suggest you to use the eclipse plugin for the visualization of the jacoco report.

Hope it helps!

like image 89
Federico José Sorenson Avatar answered Nov 10 '22 06:11

Federico José Sorenson