What is “Code Coverage”?
The “Code Coverage” DevOps quality metric measures what percentage of the source code is exercised by tests. Code coverage can be measured in a number of different ways; for example, statement (line) coverage, branch coverage, MC/DC coverage, etc. Code coverage is primarily used with unit tests, but can expand into functional validation, integration testing, and end-to-end testing.
How “Code Coverage” Ranks vs. Other DevOps Quality Metrics
In new Forrester research on DevOps quality metrics, DevOps leaders ranked “Code Coverage” as the #5 most valued build quality metric. Of the 28% of DevOps leaders who measured this metric, 58% of them ranked it as one of their most valuable DevOps quality metrics. This metric was not found to be a “DevOps Differentiator” (DevOps experts/leaders measured it significantly more than DevOps laggards did).
Here‘s a quick look at how “Code Coverage” is positioned vs. other Build Metrics—based on the raw data collected from DevOps experts. “DevOps Differentiators” are highlighted in green.
These findings are expanded upon in the new ebook: Forrester Research on DevOps Quality Metrics that Matter: 75 Common Metrics—Ranked by Industry Experts.