Skip to content

Requirements Traceability Matrix Modernized

github-actions[bot] edited this page Oct 9, 2026 · 1 revision

Requirements Traceability Matrix — Modernized Screen

Enhancement screen for GitHub issue #1065: a Requirements Traceability Matrix (RTM) that traces every requirement of a test project to the test cases that cover it and to their latest execution result on a selected build/platform.

Unlike the Requirements Coverage report (Requirements-Coverage-Modernized), which aggregates how well a plan meets its requirements, the RTM is a requirement-first, bidirectional view: it includes orphan requirements (linked to nothing) and lists each requirement's individual linked test cases together with their in-plan status and latest result, plus the plan's orphan test cases (assigned to the plan but linked to no requirement).

Path: Reports → Requirements Traceability Matrix URL: /gui/templates/results/rtm.html?tproject_id=<id>&tplan_id=<id> BFF API: /api/rtm/index.php?action=matrix&tplan_id=<id>&build_id=<id>&platform_id=<id> (0 = any) BFF context: /api/rtm/index.php?action=context&tplan_id=<id> Right: testplan_metrics, enforced server-side against the owning project of the plan.


Table of Contents

  1. What the screen does
  2. Coverage semantics
  3. REST API Reference
  4. i18n Keys
  5. Security
  6. Screenshots
  7. Testing

1. What the screen does

Column Meaning
Req ID requirements.req_doc_id (e.g. R6-REQ-1)
Requirement Requirement title, from nodes_hierarchy; an orphan chip is shown for requirements with no traceability link
Req Spec Spec doc-id (RS-R6) · spec title
Linked TCs Expandable count; the detail table lists each req_coverage-linked test case with external id, name, version, suite, In plan and Latest result
Executed In-plan linked test cases that have an execution on the build/platform filter (n/max)
Passed In-plan linked test cases whose latest filtered execution is p
Defects Distinct bugs (execution_bugs) raised by executions of the requirement's linked test cases on the filter
Coverage covered / partial / uncovered

The toolbar carries Platform / Build selects ([Any] = 0) with Apply, and a Export CSV button (client-side, UTF-8, correctly quoted). The summary strip shows counts for covered / partial / uncovered / orphan requirements plus a {total} requirements · {linked} of {plan} plan test cases traceable line. An Orphan test cases card lists the plan's unlinked cases.

2. Coverage semantics

  • uncovered — the requirement has no plan-assigned linked test case, or none of them was executed on the filter.
  • covered — every plan-assigned linked test case has been executed on the filter and the latest result of each is p.
  • partial — anything in between (some executed, some failing/blocked/not run).
  • orphan requirement — zero rows in req_coverage for the requirement.
  • orphan test case — a testplan_tcversions row whose version has no active req_coverage row.

"Latest result" uses MAX(executions.id) per (testplan_id, tcversion_id) on the build/platform filter, matching the project's latest-wins convention: on Any build the newest execution row decides, so a test run in a later build shadows an earlier one.

3. REST API Reference

GET /api/rtm/index.php

Action Params Returns
context tplan_id (required), tproject_id (asserted) plan/project names, open builds, platforms, requirements_enabled
matrix tplan_id (required), tproject_id (asserted), build_id, platform_id summary, rows[] (requirement + linked_tcs[]), orphan_tcs[]

rows[] fields: doc_id, title, spec_doc_id, spec_title, version, coverage_status, orphan, in_plan_count, executed_count, passed_count, defects, linked_tcs[] (tc_external_id, name, version, suite, in_plan, exec_status).

Machine codes: 400 (missing/unknown action or missing plan), 401 anonymous, 403 no rights / same-origin guard, 404 unknown plan / project_mismatch, 405 non-GET (guarded).

4. i18n Keys

rtm.* (35 keys, incl. rtm.orphanReqs) + footers.rtm present in all 10 bundles; ai/verify_i18n_coverage.sh 9/9 PASS (7136 keys). The Reports entry label uses the server string $TLS_link_report_requirements_traceability (en_GB/en_US).

5. Security

  • Session auth + bffSameOriginGuard + bffEnforceSession on every request.
  • testplan_metrics re-checked server-side on the owning project proved from the plan; a client-supplied tproject_id that mismatches → 404 project_mismatch.
  • All ids intval()-bound; names/ids escaped client-side.
  • 2.0.1 schema drift respected: plan/project names read from nodes_hierarchy (no name column on testplans/testprojects).

6. Screenshots

Requirements Traceability Matrix — all builds Expanded per-requirement linked test cases Build 2 filter — latest-wins flips the covered requirement to partial

7. Testing

Suite Modernize — Issue #1065 in tmp/TLU_Test_Cases.md: 19/19 PASS (BFF context/matrix, build flips, orphan requirement + orphan test case, defect count, 400/401/403/404 matrix, requirements-disabled, no-rights card, UI load/expand/filter/CSV, wiring, i18n gate, Event Viewer clean). Fixture tmp/fixtures_1065.php. Docs mirror: docs/Requirements-Traceability-Matrix-Modernized.md.

Clone this wiki locally