test_each_requirement_gets_its_tier¶
Tests › tests/test_wiki_evidence.py
What this test is for
Why it exists
PASS, GAP, TARGET, NOT_RUN and MISSING, each from its own evidence.
Given
junit = tmp_path / "junit.xml"junit.write_text(_JUNIT)
2 more
cov = tmp_path / "coverage.xml"cov.write_text(_COBERTURA)
When
rows = { r.req_id: r for r in requirement_evidence( traced, junit=[junit], coverage=cov, target_only=("test_flash",) ) }
Then
- ✓ {k: v.tier for k, v in rows.items()} equals { "R-PASS": "PASS", "R-GAP": "GAP", "R-TARGET": "TARGET", "R-NOTRUN": "NOT_RUN", "R-MISSING": "MISSING", }
- ✓ rows["R-PASS"].implementers_covered equals ("impl",)
- ✓ rows["R-MISSING"].implementers_uncovered equals ("dead",)
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
Build this wiki from the index · 7 of 400 steps
… 344 earlier steps
… 45 later steps
tests/test_wiki_evidence.py:112 · its file's page
What it checks (3)
assert {k: v.tier for k, v in rows.items()} == { "R-PASS": "PASS", "R-GAP": "GAP", "R-TARGET": "TARGET", "R-NOTRUN": "NOT_RUN", "R-MISSING": "MISSING", }observesrequirement_evidenceviarowsassert rows["R-PASS"].implementers_covered == ("impl",)observesrequirement_evidenceviarowsassert rows["R-MISSING"].implementers_uncovered == ("dead",)observesrequirement_evidenceviarows
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 7 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-WIKI-002 measured
- REQ-DDB-WIKI-010 measured
- REQ-DDB-WIKI-016 measured
- REQ-DDB-WIKI-017 measured
- REQ-DDB-WIKI-054 inferred