Code coverage

Code coverage measures the share of the code executed by tests: lines, branches, functions. It shows what is not tested, but not the quality of the tests: covered code without a meaningful assertion can still be wrong. It is an indicator, not a goal in itself.

Example

Branch coverage: 82% of the conditional paths are executed.

Related concepts

The whole glossary