test_catch2_section_cases_fold_into_their_test_case¶
Tests › tests/test_wiki_frameworks.py
What this test is for
Why it exists
FOUND ON SASSAFRAS-CLASS (round 4): Catch2's own JUnit reporter writes one testcase per SECTION PATH ("Scenario: X/Given: a/When: b"), under classname `<binary>.global`; the index knows the test case ("Scenario: X"), so 230 of 267 tested requirements read NOT_RUN. Section cases fold into their test case, worst status first — and a FAILURE keeps its message, which a test page shows in red (only skip messages were kept).
Verifies REQ-DDB-WIKI-017
Given
report = tmp_path / "catch2.xml"report.write_text( '<testsuites><testsuite name="t">' '<testcase classname="t.global" name="Scenario: X/Given: a" status="run"/>' '<testcase classname="t.global" name="Scenario: X/Given: a/When: b" status="run">' '<failure message="REQUIRE( n == 2 )">expanded: 1 == 2</failure></testcase>' '<testcase classname="t.global" name="Scenario: Y" status="run"/>' "</testsuite></testsuites>" )
When
results = parse_junit([report])
Then
- ✓ set(results) equals {"Scenario: X", "Scenario: Y"}
- ✓ results["Scenario: X"].status equals "failed"
- ✓ results["Scenario: X"].cases equals 2
- ✓ results["Scenario: X"].message contains "REQUIRE( n == 2 )"
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_frameworks.py:176 · its file's page
What it checks (3)
assert set(results) == {"Scenario: X", "Scenario: Y"}observesparse_junitviaresultsassert results["Scenario: X"].status == "failed" and results["Scenario: X"].cases == 2observesparse_junitviaresultsassert "REQUIRE( n == 2 )" in results["Scenario: X"].messageobservesparse_junitviaresults
Where the product reaches it
build_wiki→_build_site→parse_junit(flow)
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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-017 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-002 measured
- REQ-DDB-WIKI-010 measured