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, --txt |
Text Output | compact human-readable summaries |
--html |
HTML Output | overview of all files |
--html-details |
HTML Output | annotated source files |
--cobertura |
Cobertura XML Output | machine readable XML reports in Cobertura format |
--sonarqube |
Sonarqube XML Output | machine readable XML reports in Sonarqube format |
--json |
JSON Output | JSON report with source file structure and coverage |
--json-summary |
JSON Output | JSON summary coverage report |
--csv |
CSV Output | CSV report summarizing the coverage of each file |
--coveralls |
Coveralls JSON Output | machine readable JSON report in Coveralls 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
- Source Code on GitHub
- Change Log
This documentation (https://gcovr.com/) describes gcovr 6.0.
Contents:
- Installation
- Getting Started
- User Guide
- Command Line Reference
- Cookbook
- Frequently Asked Questions
- Contributing
- Change Log
- 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