Skip to main content
API coverage tracking compares your test files against an OpenAPI specification to show which endpoints have tests and which do not. This helps identify gaps in your test suite.

Usage

Enable coverage with the --coverage flag and point to your OpenAPI spec:
The --openapi flag is required when --coverage is set. Coverage runs after your tests complete and the report is printed to the console.

What Coverage Tracks

The coverage report shows:
  • Overall coverage percentage — the ratio of tested endpoints to total endpoints in the spec
  • Covered endpoints — endpoints that have at least one test request matching the method and path
  • Uncovered endpoints — endpoints defined in the spec with no matching test
  • Coverage by tag/category — grouped by OpenAPI tags if present

Flags

Example

Given an OpenAPI spec with 20 endpoints and tests covering 15 of them:

CI/CD Integration

Use coverage reporting in your CI pipeline to track coverage over time:
Run coverage checks locally before pushing to catch missing tests early. Pair coverage with the OpenAPI import command to generate test stubs for uncovered endpoints.
Last modified on July 10, 2026