Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

 

 

 

Tests

MetricKeyDescriptionSupported by
Branch coveragebranch_coverage

On each line of code containing some boolean expressions, the branch coverage simply answers the following question: 'Has each boolean expression been evaluated both to true and false?'. This is the density of possible branches in flow control structures that have been followed.

Code Block
Branch coverage = (CT + CF) / (2*B)

where

CT = branches that have been evaluated to 'true' at least once
CF = branches that have been evaluated to 'false' at least once
(CT + CF = conditions_to_cover - uncovered_conditions)

B = total number of branches (2*B = conditions_to_cover)
 
Coveragecoverage

It is a mix of Line coverage and Branch coverage. Its goal is to provide an even more accurate answer to the following question: 'How much of the source code has been covered by the unit tests?".

Code Block
Coverage = (CT + CF + LC)/(2*B + EL)

where

CT = branches that have been evaluated to 'true' at least once
CF = branches that have been evaluated to 'false' at least once
LC = covered lines = lines_to_cover - uncovered_lines

B = total number of branches (2*B = conditions_to_cover)
EL = total number of executable lines (lines_to_cover)
 
Line coverageline_coverage

On a given line of code, Line coverage simply answers the following question: 'Has this line of code been executed during the execution of the unit tests?'. Tis is the density of covered lines:

Code Block
Line coverage = LC / EL

where

LC = covered lines (lines_to_cover - uncovered_lines)
EL = total number of executable lines (lines_to_cover)
 

 

Asserts Counted

Asserts per Test

 

MetricKeyDescriptionSupported by
Complexitycomplexity

The Cyclomatic Complexity is...

Expand
titleKeywords incrementing the complexity:
LanguageKeywords
Cobol

GOTO, ...

Javaif, ...
All 
LineslinesNumber of carriage returns.All
ParagraphxxxxblablaCobol
XXXxxxxblablaAll but Cobol