test_ceedling_and_unity_results_are_read

Tests › tests/test_wiki_frameworks.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Verifies REQ-DDB-WIKI-017

Given

  1. ceedling = tmp_path / "report.xml"
  2. 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
  1. unity = tmp_path / "unity.txt"
  2. 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" )
  3. expected = {"test_loads": "passed", "test_saves": "failed", "test_hw": "skipped"}
→

When

  1. parse_results("ceedling", ceedling)
  2. parse_results("unity", unity)
→

Then

  1. ✓ {k: v.status for k, v in parse_results("ceedling", ceedling).items()} equals expected
  2. ✓ {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

callercallercallercallerother filesother filesother filesother filesopt (line 200)optloop (line 259)loopelif (line 264)elifopt (line 202)optbuild_wiki132–133. parse_contexts → _contexts_from_lcov132_contexts_from_lcov +1 more134. _text → check_report_size134check_report_size▶ test enters135. _contexts_from_lcov → _relative135_relative136. parse_contexts → _contexts_from_data_file136_contexts_from_data_file

… 209 steps between

callercallercallercallerclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyother filesother filesother filesother filesbuild_wiki346. _build_site → parse_junit346parse_junit347. parse_junit → fold_cases347fold_cases348. fold_cases → _folded348_folded▶ test enters349–350. parse_junit → _case_name349_case_name +1 more

… 50 later steps

tests/test_wiki_frameworks.py:72 · its file's page

What it checks (2)

  1. assert {k: v.status for k, v in parse_results("ceedling", ceedling).items()} == expected observes parse_results
  2. assert {k: v.status for k, v in parse_results("unity", unity).items()} == expected observes parse_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

test_ceedling_and_unity_results_are_read→parse_results

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.

test_ceedling_and_unity_results_are_read · 2 checksparse_resultsREQ-DDB-WIKI-010 · measured

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-017catalogunknown
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.