Skip to main content
coverage measures how much of your requirement graph is covered by your code and tests. It runs one or all of your configured coverage profiles and reports counts alongside every node’s status and the shortest path that covers it.

Synopsis

Pass a profile name to run a single profile, or omit it to run all configured profiles. Add --check to make the command fail when any required node is uncovered — useful as a CI gate.

Flags

string
Name of a specific coverage profile defined in your xspec config. When omitted, all configured profiles are evaluated.
flag
Exit 1 if any node with coverage: required is uncovered. Without this flag the command always exits 0 and is purely informational.
flag
Emit the full report as a single JSON document on stdout instead of the human-readable format.

Output

The report is organized into three sections for each profile: covered, uncovered, and ignored.

Node status meanings

CI gating pattern

Use --check to fail your build when required coverage drops. Pair it with xspec build to ensure the graph is current before checking coverage.
To gate on a specific profile only:

JSON output

With --json, the full report structure is emitted as a JSON document. Each profile produces an object with covered, uncovered, and ignored arrays. Each entry in covered includes the node identity and the full shortest covering path. Each entry in uncovered includes the identity and the required flag. Each entry in ignored includes the identity and the reason string.