gcovr
Gcovr provides a utility for managing the use of the GNU gcov utility and generating summarized code coverage results. This command is inspired by the Python coverage.py package, which provides a similar utility for Python.
The gcovr
command can produce different kinds of coverage reports:
CLI Option |
User Guide |
Description |
---|---|---|
default, |
compact human-readable summaries |
|
overview of all files |
||
annotated source files |
||
use custom set of Jinja2 templates |
||
CSV report summarizing the coverage of each file |
||
JSON report with source file structure and coverage |
||
JSON summary coverage report |
||
machine readable XML reports in Clover format |
||
machine readable XML reports in Cobertura format |
||
machine readable JSON report in Coveralls format |
||
machine readable XML reports in JaCoCo format |
||
machine readable report in LCOV info format |
||
machine readable XML reports in SonarQube format |
Thus, gcovr can be viewed as a command-line alternative to the lcov utility, which runs gcov and generates an HTML-formatted report. The development of gcovr was motivated by the need for text summaries and XML reports.
Quick Links
Getting Help
Install from PyPI:
pip install gcovr
This documentation (https://gcovr.com/) describes gcovr 8.2.
- Installation
- Getting Started
- User Guide
- Command Line Reference
- Cookbook
- Frequently Asked Questions
- Contributing
- Change Log
- 8.2 (13 October 2024)
- 8.1 (13 October 2024)
- 8.0 (07 October 2024)
- 7.2 (24 February 2024)
- 7.1 (24 February 2024)
- 7.0 (25 January 2024)
- 6.0 (08 March 2023)
- 5.2 (06 August 2022)
- 5.1 (26 March 2022)
- 5.0 (11 June 2021)
- 4.2 (6 November 2019)
- 4.1 (2 July 2018)
- 4.0 (17 June 2018)
- 3.4 (12 February 2018)
- 3.3 (6 August 2016)
- 3.2 (5 July 2014)
- 3.1 (6 December 2013)
- 3.0 (10 August 2013)
- 2.4 (13 April 2012)
- 2.3.1 (6 January 2012)
- 2.3 (11 December 2011)
- 2.2 (10 December 2011)
- 2.1 (26 November 2010)
- 2.0 (22 August 2010)
- License