Techment — Site Header

What is Test Coverage

Definition

Test coverage is a measure of how much of a codebase or its behaviours are exercised by tests, expressed for example as the percentage of lines, branches, or requirements covered, helping teams identify untested areas and gauge the thoroughness of their testing.
« Back to Glossary Index
  • Reveals untested parts of the codebase that carry hidden risk
  • Provides a measurable indicator of testing thoroughness
  • Guides where to add tests to reduce the most risk
  • Supports quality gates that prevent coverage from regressing

Real World Example

A team measures test coverage and finds the error-handling paths of a payment module are largely untested, prompting them to add targeted tests for those high-risk branches before release.

FAQs

What does test coverage measure?

It measures how much of the code or its behaviours, such as lines, branches, or requirements, is exercised by the test suite.

Does high coverage guarantee quality?

No, coverage shows what is executed but not whether assertions are meaningful, so high coverage with weak tests can still miss defects.

How is coverage used effectively?

As a guide to find untested risky areas, not as a target to game; quality of tests matters more than the raw percentage.

Hello popup window