Gate: scenario-asserts
The outcome step asserts an observable outcome.
| Property | Value |
|---|---|
| Checker | scenario-asserts |
| Confronts | feature |
| Blocking by default — new project | yes |
| Blocking by default — existing project | no — informs |
How it measures
Section titled “How it measures”Confronts feature files against tautological step definitions: the outcome step of a scenario must assert an observable result, rather than merely repeating the requirement code.
A scenario in Gherkin exists to govern the test: it commits the system to an observable outcome before anyone writes the assertion code. When an outcome step degenerates into a tautology — such as stating that the requirement code is verified — it asserts nothing. Two scenarios for entirely different requirements become indistinguishable, and the definition of what constitutes verification migrates completely into the test implementation, which is the very artifact the scenario was meant to govern.
The operational risk of tautological scenarios is structural: when nobody between the specification and the test is required to write down the expected outcome, the resulting test is written without a discriminating case. A mutation that completely removes the production logic can leave the test suite green, because the test itself was never anchored to a concrete outcome. In a measured reference project, 359 scenarios suffered from this exact defect, having been mechanically copied from templates.
This gate prevents this structural defect by isolating outcome steps and mechanically checking whether the step consists solely of a requirement identity code wrapped in linking words.
This gate operates in distinct territory from neighbouring gates:
- Unlike
feature-test-match, which verifies scenario-to-test alignment by comparing scenario codes and titles against test titles, this gate inspects the inner substance of outcome steps to ensure they assert real behavior. - Unlike
spec-complete, which verifies that requirements are structurally catalogued in specifications, this gate ensures that scenarios realizing those requirements commit to verifiable outcomes. - Unlike natural language review gates, this gate does not judge prose style; it applies a deterministic filter that flags steps where removing linking words leaves only the requirement identity.
Declaring it
Section titled “Declaring it”gates: - name: scenario-asserts on: [feature] check: scenario-asserts