What is a traceability matrix?
A traceability matrix links requirements to test cases, execution results and defects in both directions. It shows whether every requirement is covered and helps to assess the impact of changes and to prepare for an audit. It shows requirement coverage, not the quality of the cases or code coverage: a requirement with one weak case still counts as covered.
QA Fundamentals · Test documentation
Developers changed the fee rule. Which tests should be rerun and which requirements are at risk?
On Friday a change lands: the transfer fee is now calculated differently. Somebody asks what it affects. Without links the answer is “well, transfers and balance somewhere” and hours of searching through cases. With links it is a query: requirement REQ-FEE-02 is tied to four cases and two stories. That link is the traceability matrix.
How it works and why. The matrix links a requirement, test cases, execution results and defects. The link goes both ways. Forward (requirement to cases) shows whether every requirement is covered; backward (case to requirement) shows why a case exists and which requirement a defect touched. In ISTQB terms traceability between the test basis and test work products helps to assess coverage, analyse the impact of changes, prepare for audits and make progress reports understandable to stakeholders. The price is simple: links must be maintained, so they have to live where people work every day.
A chain of links and two directions of questions
Worked example: the matrix before and after. A fragment of the limits matrix. The REQ-LIM-04 row reveals a gap invisible in the list of cases:
| Requirement | Cases | Result | Defects |
|---|---|---|---|
| REQ-LIM-01 A transfer above the daily limit is blocked | TC-PAY-010, TC-PAY-014 | Passed | — |
| REQ-LIM-02 The limit resets at 00:00 in the user’s time | TC-PAY-021 | Failed | BUG-412 |
| REQ-LIM-03 The remaining limit is shown | TC-PAY-014 | Passed | — |
| REQ-LIM-04 An admin changes the limit | no cases | not covered | — |
This table gives three answers in a minute: what is not covered (LIM-04), what failed and which requirement it touches (BUG-412 and LIM-02), which cases to repeat if the LIM-01 rule changed (010 and 014). For automation the link is often kept in the test name or tags, for example in Playwright:
test(
'Transfer exactly at the daily limit',
{ tag: ['@REQ-LIM-01', '@REQ-LIM-03'] },
async ({ page }) => {
// ...
},
);
// npx playwright test --grep @REQ-LIM-03
Where the matrix lives
A separate table filled once
It was assembled before an audit and forgotten. A month later new cases and requirements are missing and it cannot be trusted.
Links in the tracker and IDs in the name
A story is linked to cases and bugs in Jira (Zephyr, Xray), automated tests carry the ID in the name or tag. The report is built from live links.
Limits and alternatives. The matrix shows that a requirement has a case, not that the case is good: a requirement covered by one weak case is “covered” in the matrix. It is also requirements coverage, not code coverage, which is measured separately. For a small Agile team a full matrix at every level is overkill: story acceptance criteria and a story-cases-bugs link are often enough. A full matrix is justified where a regulator or an audit demands it, for example in fintech, and for high-risk requirements.
Common mistakes.
- Reporting “100% of requirements covered” without looking at case quality: the number soothes but guarantees nothing.
- Keeping the matrix by hand in a separate file: it drifts from the tracker within a sprint.
- Requirements without IDs: nothing to hang a link on, the link lives in memory.
- Never looking backward: cases without a requirement stay orphaned and check obsolete behaviour for years.
Check yourself
The matrix shows every requirement has at least one case. Does that mean the product is well tested?
Answer
No. It speaks about the presence of a link, not about case quality or depth of the check. A requirement with one shallow case is covered only formally. Risk, boundaries and run results still have to be looked at.
What does the link “from a case to a requirement” show that the forward link cannot?
Answer
Backward you see why a case exists and whether it is obsolete: a case without a requirement is an orphan or a gap in requirements. Forward only shows requirements without cases.