test_requirements_export_as_reqif¶
Tests › tests/test_wiki_exports.py
What this test is for
Why it exists
ReqIF 1.2: one SPEC-OBJECT per requirement with its id, title and tier.
Verifies REQ-DDB-WIKI-029
Given
root = ET.parse(_html(site) / "exports/requirements.reqif").getroot()objects = root.findall(f".//{_REQIF}SPEC-OBJECT")values = { v.get("THE-VALUE") for o in objects for v in o.findall(f".//{_REQIF}ATTRIBUTE-VALUE-STRING") }
When
- —
Then
- ✓ root.tag equals f"{_REQIF}REQ-IF"
- ✓ len(objects) equals 3
- ✓ {"REQ-W-001", "Load the data", "PASS"} is at most values
- ✓ root.findall(f".//{_REQIF}SPECIFICATION") holds
tests/test_wiki_exports.py:59 · its file's page
What it checks (3)
assert root.tag == f"{_REQIF}REQ-IF"observes_htmlviarootassert len(objects) == 3 and {"REQ-W-001", "Load the data", "PASS"} <= valuesnot attributedassert root.findall(f".//{_REQIF}SPECIFICATION")observes_htmlviaroot
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
test_requirements_export_as_reqif→_htmlWhat 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-029 | catalog | unknown |