dev-tools
Glossary ↗Code Coverage
Code coverage is a metric that measures how much of your source code is actually exercised by your automated tests, usually expressed as a percentage of lines, branches, or functions run during a test suite. A coverage tool instruments the code, runs the tests, and reports which lines never executed — highlighting untested paths. It's useful as a spotlight on blind spots: code with 0% coverage is code no test has ever run. But coverage is easy to game and a poor target on its own — 100% coverage doesn't mean the tests assert anything meaningful, and chasing a number can produce tests that execute code without checking behavior. For AI/SaaS builders the pragmatic use is directional: watch that coverage doesn't drop on critical modules, and use coverage reports to find genuinely untested logic, rather than treating a high percentage as proof of quality. Practical note: enforce a floor on important paths in CI, but judge tests by whether they'd catch a real bug, not by the coverage badge.
Related terms