Skip to content

colcon/colcon-coveragepy-result

Repository files navigation

colcon-coveragepy-result

PyPI GitHub Action Status

A colcon extension for collecting coverage.py results. It provides the coveragepy-result command.

Install

The corresponding package names are:

  • apt: python3-colcon-coveragepy-result
  • pip: colcon-coveragepy-result

Refer to the colcon installation instructions for more information.

Usage

  1. 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
  2. Test packages with coverage, again using a mixin
    $ colcon test --mixin coverage-pytest
  3. Collect coverage results using the coveragepy-result command provided by this extension
    $ colcon coveragepy-result
  4. Open HTML report, which by default is under coveragepy/htmlcov/

Options

  • 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

Contributing

See:

About

A colcon extension for collecting coverage.py results

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages