Skip to main content

Code coverage

Roboticks ingests code coverage (gcov/lcov for C++, coverage.py for Python) alongside JUnit XML and displays it in the test-run detail UI. Coverage is one of the headline numbers on every Check Run, but it answers a different question than requirement coverage.
Code coverage and requirement coverage are different. Code coverage measures what fraction of your source lines were executed by tests. Requirement coverage measures what fraction of your requirements have at least one passing test. A repo can have 100% line coverage and 30% requirement coverage. They are independent dimensions.

What we ingest

The runner auto-discovers files named coverage.xml, coverage.info, or cobertura.xml in the workspace after tests complete and uploads them.

Python coverage

Add pytest-cov to your dev dependencies:
Run pytest with --cov:
The runner finds coverage.xml and ships it. Locally, the same file works for any coverage UI.

C++ coverage (colcon)

Coverage in a colcon workspace is a two-step dance: build with coverage flags, then capture after colcon test.
Roboticks ships a CI-friendly wrapper:
That single command runs the lcov dance with project-aware exclusions.

In CI

GitHub Actions step that produces both pytest and gtest coverage:
When you’re using the GitHub App, the upload happens automatically — the action above is for CI systems where you call the API yourself. See CI recipes.

Where coverage surfaces

Coverage gates

Configure a coverage floor in roboticks.yaml:
The Check Run respects the gate. The matrix annotates each requirement’s confirming tests with their per-file coverage.

Coverage is not enough

A 95% line coverage number with 40% requirement coverage means “we run a lot of code, but we have not proven the requirements”. An auditor will accept the latter and ignore the former. Use coverage to find dead code; use requirement coverage to ship.

Next

Requirement coverage

The dimension that pays the audit bill.

CI recipes

Wire coverage capture into GitHub Actions, Jenkins, CircleCI, BuildKite.

Check Runs

The PR-side surface for both coverage numbers.

Matrix UI

How coverage joins requirements visually.