Skip to main content

Published

Requirement coverage

In brief: Requirement coverage rolls test executions up to the scenarios and user stories they cover, so you can see which requirements are tested, failing or untested for a branch, environment, release and time window.

Requirement coverage answers: which of the requirements you wrote down have tests, did those tests run in the scope you care about, and did they pass? TestChimp links tests to test scenarios, scenarios to user stories, and rolls the latest executions up to each level.

Where the signal comes from​

Tests declare which scenarios they cover with a scenario annotation (see Linking scenarios and Requirement traceability). When those tests run with @testchimp/playwright, each execution is attributed to its scenarios. TestChimp then rolls the results up:

  • Scenario: covered when a linked test ran in scope. Its status follows the latest execution (passing or failing).
  • User story: shows how many of its scenarios are covered, and flags stories that have untested scenarios or no scenarios at all.
  • Folder: rolls up the stories or scenarios underneath it, so you can check an epic or feature area at once.

Manual test sessions can count too, when you include them in the scope.

Open the view​

Go to Insights → Requirement coverage.

  1. Pick a scope in the plans tree. Select a folder or file under your stories or scenarios.
  2. Set the execution scope. Choose a branch, environment, release and time range (the last 14 days by default). Turn on Include manual sessions to count manual runs. Mobile and multi-platform projects also get a platform selector (Web, iOS, Android).
  3. Read the results. The Tree view tab lists stories or scenarios with their coverage and the tests behind them. The Semantic canvas tab places scenarios on a map coloured by their latest result, so clusters of untested or failing scenarios stand out.

The summary at the top counts, for the selected scope:

  • user stories with untested scenarios;
  • user stories without scenarios;
  • high-priority scenarios that are failing;
  • high-priority scenarios that are not tested.

The same rollup appears in the Test Planning Insights tab and, for a release, in release intelligence.

Use it with agents​

Agents read requirement coverage through the get-requirement-coverage tool (CLI and MCP). It accepts the same scope: plan or test folders, branch, environment, release, time window and platform. In ranked mode it returns the top gaps, including scenarios with no linked test yet.

  • /testchimp fix coverage gaps uses it to pick untested scenarios and write tests for them. See Fix coverage gaps.
  • /testchimp test uses it to check that the scenarios for a change are covered before you merge.

How it relates to the other coverage types​

Requirement coverage tells you a story has tests. It does not tell you which values of a feature flag those tests ran, or which API fields they sent. Feature flag coverage uses the same story to scenario to test lineage and adds the flag arms. See the Coverage overview for all four types.

FAQ

How are tests linked to requirements?

Tests declare the scenarios they cover with a scenario annotation, and scenarios belong to user stories. TestChimp rolls executions up from tests to scenarios, stories and folders.

Can manual sessions count toward requirement coverage?

Yes. Turn on Include manual sessions in the execution scope.

Can agents read requirement coverage?

Yes. The get-requirement-coverage tool returns coverage for a scope, and in ranked mode the top gaps, including scenarios with no linked test.