coverage.py
The standard Python tool for measuring code coverage, which records which lines and branches ran.
In more detail
You can run it directly or through the pytest-cov plugin. Its reports list each file with its statement count, missed statements, percentage covered and, if asked, the missing line numbers.
Related terms
- code coverage — A measurement of which parts of your code ran while the tests ran.
- pytest-cov — A pytest plugin that runs coverage.py during the test run and prints a coverage report at the end.
Taught in
- Statement And Branch Coverage — ISTQB Certified Tester Foundation Level (CTFL v4.0) Exam Prep
- Test Tools And The Truth About Automation — ISTQB Certified Tester Foundation Level (CTFL v4.0) Exam Prep
- Coverage: Diagnostic, Not Target — Automated Testing, TDD & Quality Engineering