Title: About Code Coverage | Clover Data Center and Server 4.1 | Atlassian Documentation
Headings: About Code Coverage
About Code Coverage
What is Code Coverage?
Why Measure Code Coverage?
How Code Coverage Works
Code Coverage with Clover
Types of Coverage measured
What about Line Coverage metric?
Further reading
Was this helpful?

Content: Types of Coverage measured
Clover measures three basic types of coverage analysis: Statement
Statement coverage measures whether each statement is executed. Branch
Branch coverage (sometimes called Decision Coverage) measures which possible branches in flow control structures are followed. Clover does this by recording if the boolean expression in the control structure evaluated to both true and false during execution. In Groovy code, Clover also treats Elvis expressions (a :? b), safe method calls (a?.b ()), safe property calls (a?.b) and safe attribute calls (a?.@b) as branches. Method
Method coverage measures if a method was entered at all during execution. Clover uses these measurements to produce a Total Coverage Percentage for each class, file, package and for the project as a whole. The Total Coverage Percentage allows entities to be ranked in reports. The Total Coverage Percentage (TPC) is calculated as follows: