test_ceedling_and_unity_results_are_read¶
Tests › tests/test_wiki_frameworks.py
What this test is for
Given
ceedling = tmp_path / "report.xml"ceedling.write_text( "<TestRun><FailedTests><Test id='1'><Name>test/test_store.c::test_saves</Name></Test>" "</FailedTests><SuccessfulTests><Test id='2'><Name>test/test_store.c::test_loads</Name>" "</Test></SuccessfulTests><IgnoredTests><Test id='3'><Name>test/test_store.c::test_hw</Name>" "</Test></IgnoredTests></TestRun>" )
3 more
unity = tmp_path / "unity.txt"unity.write_text( "test/test_store.c:10:test_loads:PASS\ntest/test_store.c:20:test_saves:FAIL: Expected 1\n" "test/test_store.c:30:test_hw:IGNORE\n-----------------------\n3 Tests 1 Failures 1 Ignored\n" )expected = {"test_loads": "passed", "test_saves": "failed", "test_hw": "skipped"}
When
parse_results("ceedling", ceedling)parse_results("unity", unity)
Then
- ✓ {k: v.status for k, v in parse_results("ceedling", ceedling).items()} equals expected
- ✓ {k: v.status for k, v in parse_results("unity", unity).items()} equals expected
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 · 2 of 400 steps
… 131 earlier steps
… 209 steps between
… 50 later steps
tests/test_wiki_frameworks.py:72 · its file's page
What it checks (2)
assert {k: v.status for k, v in parse_results("ceedling", ceedling).items()} == expectedobservesparse_resultsassert {k: v.status for k, v in parse_results("unity", unity).items()} == expectedobservesparse_results
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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-017 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-010 measured