gcovr
Gcovr provides a utility for managing the use of the GNUgcov utilityand generating summarized code coverage results. This command isinspired by the Pythoncoverage.py package, which provides a similarutility for Python.
Thegcovr
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 inClover format | ||
machine readable XML reports inCobertura format | ||
machine readable JSON report inCoveralls format | ||
machine readable XML reports inJaCoCo format | ||
machine readable report inLCOV info format | ||
machine readable XML reports inSonarQube format |
Thus, gcovr can be viewedas a command-line alternative to thelcov utility, which runs gcovand generates an HTML-formatted report.The development of gcovr was motivated by the need fortext summaries and XML reports.
Quick Links
Getting Help
Install fromPyPI:
pipinstallgcovr
This documentation (https://gcovr.com/)describes gcovr 8.3.
Contents:
- Installation
- Getting Started
- User Guide
- Command Line Reference
- Cookbook
- Frequently Asked Questions
- Contributing
- Change Log
- 8.3 (19 January 2025)
- 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