QA glossary
What is test coverage?
Test coverage is a measure of how much of a product the tests have exercised. It can be counted against the code, against the requirements or against risks and platforms. A high figure shows what was run, never that what was run was checked well.
An example from QA practice
A refund function shows 100% line coverage because a test calls it. The test only asserts that no error was thrown. The refund is calculated on the wrong amount, and no test notices, because nothing compared the amount with the expected one. The coverage report was green and the defect shipped.
Kinds of coverage
Teams use the word for several different measures, so ask which one is meant:
- Code coverage: the share of statements or branches the tests execute. Tools report it automatically.
- Requirements coverage: how many requirements have at least one test. A traceability matrix is the usual way to show it.
- Risk coverage: whether the areas that would hurt most if they failed have the most testing.
- Platform coverage: which browsers, devices and operating systems were tested.
Why a target number misleads
Set a target of 90% and people write tests that run lines, not tests that check results. Use coverage as a map of what has never been exercised, and read the gaps, not the total. Low coverage in a payment module matters more than low coverage in a settings page, and 100% of the wrong things is still wrong.
How BetterQA does it
BugBoard links test cases to Jira tickets to report ticket coverage, and it can analyse a test suite for missing cases such as edge cases and error states. Our engineers use that list to decide what to add next, rather than chasing a percentage.
Related terms
Testing designed from the structure of the code, where code coverage comes from.