A colcon extension for collecting coverage.py results.
It provides the coveragepy-result
command.
The corresponding package names are:
apt
:python3-colcon-coveragepy-result
pip
:colcon-coveragepy-result
Refer to the colcon installation instructions for more information.
- Build packages with coverage, e.g. using a colcon mixin for coverage (installation of the mixin is separate from this extension)
$ colcon build --mixin coverage-pytest
- Test packages with coverage, again using a mixin
$ colcon test --mixin coverage-pytest
- Collect coverage results using the
coveragepy-result
command provided by this extension$ colcon coveragepy-result
- Open HTML report, which by default is under
coveragepy/htmlcov/
- Print coverage reports for each package and a combined coverage report of all packages
$ colcon coveragepy-result --verbose
- Provide additional arguments for reports generation, e.g. to show lines without coverage
$ colcon coveragepy-result --coverage-report-args -m
- Provide additional arguments for HTML report generation, e.g. to skip files with no code
$ colcon coveragepy-result --coverage-html-args --skip-empty
- For more options
$ colcon coveragepy-result --help
See:
- Contributions for guidelines
- Bootstrap from source to test the package from source