Skip to content
SPECIFICTION
Get listed

Coverage.py vs gcovr

Coverage.py

coverage.readthedocs.io

gcovr

gcovr.com

Side by side

FigureCoverage.pygcovr
Price fromFree—
Free planYes—
Free trial——
Open sourceYes—
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Self-hostedYes—
Plans published20
Spec score · Test Coverage Tools8.9 (#2)7.6 (#13)
ConfigurationSettings can live in .coveragerc, TOML, setup.cfg, tox.ini, or pyproject.toml files.The user guide includes configuration files, exclusion markers and reproducible timestamp features.
Coverage typesIt measures statement coverage by default and can also measure branch coverage.Its branch coverage reports are based on GCC's -fprofile-arcs control-flow graph data.
InstallationThe documented installation command is `python3 -m pip install coverage`.gcovr is distributed as a Python package installable with pip, with development versions installable from GitHub.
IntegrationsOfficial examples cover pytest, unittest, and nose, and pytest commonly uses the pytest-cov plugin.Cobertura XML can be used with Jenkins, and gcovr also produces Coveralls and SonarQube formats.
LicenseCoverage.py is licensed under the Apache 2.0 License.gcovr is available under the BSD 3-Clause License.
PurposeCoverage.py measures which parts of Python programs ran and identifies executable code that did not run, commonly to gauge test effectiveness.gcovr manages GNU gcov and generates summarized code coverage results.
Report formatsReports can be emitted as text, HTML, XML, LCOV, or JSON.It generates text, HTML, CSV, JSON, Markdown, Clover, Cobertura, Coveralls, JaCoCo, LCOV and SonarQube reports.
SupportUsers can seek help on the Python discussion forums or Python Discord, report bugs on GitHub, and obtain professional support through Tidelift Subscription.The project directs users to GitHub issue tickets, Stack Overflow and a Gitter chat room for help.

Plans

Coverage.py

  • Coverage.pyFree
  • FreeFree

Coverage.py pricing →

gcovr

No plans published.

gcovr pricing →

In their own words

Coverage.py

Coverage.py measures which parts of Python programs run and highlights executable code that remains untouched, helping developers assess what their tests exercise. It measures statement coverage by default and can also track branch coverage. Reports are available as text, HTML, XML, LCOV, and JSON. Dynamic contexts can associate lines of execution with the test function that ran them. Coverage.py can run test suites through their usual command; pytest-cov is available but the documentation says most users do not need it. Third-party plugins can extend measurement to non-Python files, such as connecting executed Python to Django templates. Data is stored in a SQLite database, and advanced use can rely on its API. The current documentation lists Python 3.10 through 3.15 rc2 and PyPy3 versions 3.10 and 3.11. The tool provides ctrace, pytrace, and sysmon measurement cores; sysmon is faster for simple line and branch coverage but lacks support for dynamic contexts and plugins. Coverage.py is licensed under Apache 2.0 and runs on Linux, macOS, and Windows, with self-hosting available. It is free.

Visit coverage.readthedocs.io

gcovr

gcovr has no write-up on Specifiction yet; its figures are above.

Visit gcovr.com