Short answer
A SaMD traceability matrix links every software requirement back to its source (usually a user need) and forward to the verification that shows it works. Where a requirement implements a risk control, it links to that control as well. All links must hold on the same release baseline, and you must be able to follow them in both directions. A link only counts as evidence if the test ran on the right build, passed, was reviewed, and actually covers the requirement. The free template below gives you the structure: requirement, risks, test cases, defects and the environments where each test ran.
Who uses the matrix, and for what
The development team uses the matrix to see what still needs testing before a release. QA/RA uses it to decide whether a release can go to review. Auditors and Notified Body reviewers use it to sample from: they pick a requirement or a risk control and ask you to show the trail. It answers four questions:
- Where does this requirement come from? A user need, a risk control, a regulatory or standard requirement, or an architecture decision.
- Is every risk control implemented and verified? This links the matrix to your ISO 14971 risk management file.
- What evidence shows this release meets its requirements? A result, on an identified build, with a controlled record.
- What else is affected if this changes? The same links that show coverage also show the impact of a change.
The obligation itself comes from several places. ISO 13485:2016 sets out design and development inputs, verification, validation and design files (clauses 7.3.3, 7.3.6, 7.3.7 and 7.3.10). IEC 62304 asks for traceability between requirements, tests and risk control measures across its development and risk management activities. Check the exact clauses in your licensed copy. The EU MDR expects the technical documentation to contain “evidence of the validation of the software, as used in the finished device” (Annex II, section 6.1(b)). No standard requires the matrix to look a particular way. It can be a workbook, a tool export or a report, as long as it is controlled and complete.
If you build the trace in Jira and GitHub, our guide to design controls in Jira and GitHub shows how to set up the issue links, evidence capture and exports. This guide is about the matrix itself: what goes in it, and how to check it.
The example product
Fictional example
Example SaMD A is a web application in a hospital laboratory workflow. It shows processed reports to an authorised clinical reviewer, records the review, and sends the reviewed report to the hospital record system through a report-delivery API that an external supplier maintains.
How the matrix is structured
The downloadable template uses one row per requirement-to-test relationship and groups the columns as follows:
| Column group | Columns | What to record |
|---|---|---|
| Requirement | Requirement ID; title or description | One row per requirement-to-test relationship. Repeat the requirement ID when several test cases cover it. |
| Identified risks | Risk ID and short description | The risk or risk control the requirement relates to, with a reference to the risk management file, or “None”. |
| Testing reference | Test case ID; description; reference to the test record; status; date; responsible person | What was tested, where the controlled record is, the result (Pass, Fail, Blocked, Not run), and who ran it when. |
| Defect reference | Defect found; defect ID; severity; defect status; closed before release | Defects raised by the test, their severity (Blocker to Trivial, defined on the Legend tab) and whether they were closed before the product release. |
| Test execution | Test, UAT and production environments | Where the test ran and with what result. A pass in the test environment is not the same evidence as a pass in UAT. |
Use one ID scheme and never reuse an ID for a different item. In the example: EX-UN- for user needs, EX-REQ- for requirements, EX-RC- for risk controls (with EX-HAZ- for the hazard in the risk file), EX-TST- for tests and EX-VER- for the controlled evidence records. The baseline is written the same way everywhere (“1.1”), so a mismatch is easy to spot in a filter. The worked example also traces user needs and risk control IDs. Add those columns to the template if your process traces them.
The worked example: forward and backward
Fictional example
Here is the forward trace for baseline 1.1, after verification on build 1.1.0-rc2 on 28 September 2026 and before the release decision:
| User need | Requirement | Risk control (hazard) | Verification | Result, build, evidence |
|---|---|---|---|---|
| EX-UN-01 Reviewer is sure the report belongs to the patient | EX-REQ-001 Show patient and report IDs; block confirmation on mismatch (rev. B) | EX-RC-01 (EX-HAZ-01 wrong patient) | EX-TST-001 mismatch case EX-TST-007 match case | Pass · 1.1.0-rc2 · EX-VER-001 Pass · 1.1.0-rc2 · EX-VER-007 |
| EX-UN-02 Clinicians see whether a report was reviewed | EX-REQ-002 Show “Unreviewed” until an authorised reviewer confirms | EX-RC-02 (EX-HAZ-02 unreviewed taken as reviewed) | EX-TST-002 | Pass · 1.1.0-rc2 · EX-VER-002 |
| EX-UN-03 Ward staff know the report reached the record system | EX-REQ-003 “Delivery pending” until acknowledged; never “Delivered” without acknowledgement (rev. B) | EX-RC-03 (EX-HAZ-03 false delivery) | EX-TST-003 | Pass · 1.1.0-rc2 · EX-VER-003 |
| EX-UN-05 Quality team can reconstruct the version that produced a report | EX-REQ-004 Store the processing version with each report | N/A — supports investigation; not a risk control in EX-RMF-01 | EX-TST-004 | Pass · 1.1.0-rc2 · EX-VER-004 |
| EX-UN-04 Only authorised reviewers approve; approvals are attributable | EX-REQ-005 Approval only for the authorised reviewer role | EX-RC-04 (EX-HAZ-04 unauthorised approval) | EX-TST-005 | Pass · 1.1.0-rc2 · EX-VER-005 |
| EX-UN-04 (as above) | EX-REQ-006 Record identity, role, timestamp and report version for each review | N/A — attribution record; not a risk control in EX-RMF-01 | EX-TST-006 | Pass · 1.1.0-rc2 · EX-VER-006 |
Three things to notice:
- Not every requirement has every link. EX-REQ-004 and EX-REQ-006 implement no risk control. The matrix records “N/A” with a reason instead of leaving a blank, so a reviewer can tell “considered and not applicable” from “forgotten”.
- Links can be one-to-many. EX-REQ-001 has two tests, and EX-UN-04 has two requirements. Each relationship is its own row in the links sheet.
- The build is part of the evidence. “Pass” without a build ID cannot show that the release you ship is the one you tested.
The backward trace runs the other way, and catches different problems:
- From each test to its requirements. A test linked to nothing is an orphan. Either a requirement is missing from the specification, or the test is obsolete.
- From each risk control to its verification. EX-RC-03 is “implemented and verified” only because EX-REQ-003 is linked to a passed test on 1.1.
- From each user need to validation. Verification shows the software meets its requirements. Validation (EX-VAL-01 and EX-VAL-02 in the example) shows the requirements meet the user needs. The matrix records both, but they answer different questions.
Four gaps the matrix caught
Fictional example
A matrix that never shows a gap is either very new or not being checked. The example’s gap log records four, each a different type:
| Gap | How it was found | What it was | How it was closed |
|---|---|---|---|
| EX-GAP-001 | Internal audit, 3 Aug (finding EX-NC-001) | Missing link: EX-REQ-006 had no test in candidate 1.0 | EX-TST-006 added and passed on 1.1; the process cause went to CAPA EX-CAPA-001 (see the CAPA guide) |
| EX-GAP-002 | Coverage review of 1.1-rc1 | Inadequate coverage: the test for EX-REQ-001 passed but covered only the negative case | EX-TST-007 added for the matching case |
| EX-GAP-003 | Trace review before release review | Baseline mismatch: EX-REQ-003 revised for 1.1; its test still carried a 1.0 result | EX-TST-003 re-executed on build 1.1.0-rc2 |
| EX-GAP-004 | Supplier change EX-SCN-003 accepted, 9 Oct | Planned change: the delivery API will add an error code in candidate 1.2 | Open, tracked for 1.2: EX-REQ-003 to be revised and EX-TST-003 re-run. Baseline 1.1 is unaffected. |
The first gap was real at the time and must not be tidied away. The internal audit sampled candidate 1.0 and found it; the candidate was held. The 1.1 matrix is complete, but the gap stays in the record. Comparing the two snapshots shows what changed:
| Requirement | Candidate 1.0 (audit, 3 Aug) | Baseline 1.1 (28 Sep) |
|---|---|---|
| EX-REQ-001 | EX-TST-001 · Pass · Complete | EX-TST-001 and EX-TST-007 · Pass · Complete |
| EX-REQ-003 | EX-TST-003 · Pass · Complete (revision A) | Revision B · EX-TST-003 re-run · Complete |
| EX-REQ-006 | No linked test | EX-TST-006 · Pass · Complete |
| Other three | Complete | Complete |
Test exists, test passed, testing is enough
These are three separate questions. Mixing them up is the most common reason a matrix that looks complete fails review.
| Question | Answered by | Example of “no” |
|---|---|---|
| Is there a test? | A link in the matrix | EX-REQ-006 at candidate 1.0 had no linked test at all. |
| Did it pass on this release? | Result, baseline and build on the verification record | EX-TST-003 had passed, but on the earlier baseline, before EX-REQ-003 was revised. |
| Is the testing enough? | A recorded human judgement of coverage | EX-TST-001 passed, but it only tried mismatched IDs. The matching path was untested. |
The template records the first two: the test case, its status, date and responsible person, and the environment it ran in. The third is a reviewer’s judgement. Is a requirement with boundaries tested at the boundaries? Is a role restriction tested with the wrong role as well as the right one? Record that judgement in the review of the trace, for example in an extra column or in the review record, with a rationale.
Keeping links valid when things change
Most traceability breaks after the first release, not before it. A practical routine:
- Start from the change. A change request or problem report names the requirements, risk controls and interfaces it touches. The links show what else depends on them.
- Revise, don’t overwrite. Give the changed requirement a new revision and move it to the new baseline. Its earlier results no longer count until the test runs again on the new build. That is how EX-GAP-003 was caught.
- Decide what to re-run. Changed requirements need new evidence on the new build. For unchanged ones, carry earlier results forward only with a documented impact or regression rationale.
- Treat supplier changes as changes. EX-GAP-004 began as a supplier’s notice about the delivery API. It was assessed like an internal change, before implementation.
- Re-check the trace before each release review, then record the decision. The trace never makes the release decision. A person does, using evidence that also sits outside the matrix: known anomalies, validation, the benefit-risk review and the regulatory assessment of the change.
If the matrix lives in a spreadsheet, keep it under document control. If you add formulas or macros and rely on them, the spreadsheet becomes QMS software: validate it before first use and after changes (ISO 13485 clause 4.1.6).
Common mistakes
- Counting tests (“312 passed”) instead of checking coverage requirement by requirement.
- A blank risk-control cell that could mean “none needed” or “forgotten”.
- Results with no build ID, or results from a build other than the one released.
- Requirements edited in place after approval, so old results silently “cover” new text.
- Orphan tests nobody looks at: often the only sign that a requirement was dropped from the specification.
- Closed gaps deleted from the record before an audit.
- Verification and validation merged into one column.
Checklist before release review
- Every in-scope requirement is approved, has a source, and has a risk control or a reasoned “N/A”.
- Every in-scope requirement links to at least one test that passed on this baseline, on an identified build, with reviewed evidence.
- Coverage adequacy is recorded for every requirement, with a reason for anything other than “Adequate”.
- Every risk control from the risk file is implemented and verified; every user need is validated.
- No orphan tests, no duplicate IDs, no open gaps for this baseline.
- Changes since the previous release are reflected in revisions, baselines and re-verification.
- The matrix export is saved as a controlled record and referenced from the design and development file.
Download the template
Free to download, no sign-up. Opens in Microsoft Excel or LibreOffice Calc.
- Software traceability analysis — templateRequirement and identified risks, test case reference with status, date and responsible person, defects with severity, status and closure before release, and execution in test, UAT and production environments. Severity legend and document control tab.Download XLSX
Each template has a document control block and [placeholders] for your company name, product name and document IDs. Adapt it to your own procedures before use. Completing it does not establish conformity or guarantee certification.
Limits of this approach
The matrix shows that records are linked and complete. It does not show that requirements are correct, that tests are well designed, or that risks are acceptable. Those come from reviews, risk management and clinical evaluation. A spreadsheet suits a small product with tens of requirements. For larger systems, generate the matrix from your requirements and test tools, and use the checks in this guide as the review criteria for the export.
Need someone to look at your trace with fresh eyes? A technical documentation gap analysis covers software V&V traceability alongside the rest of the technical file. If you are building the process from scratch, see ISO 13485 QMS implementation.
Sources
- ISO 13485:2016 – official sample pages incl. table of contents (iTeh Standards) — clause titles 4.1.6, 7.3.3, 7.3.6, 7.3.7, 7.3.10
- NSAI – ISO 13485:2016 technical questionnaire GCL-25-01 Rev 1.1 — validation of QMS software before initial use and after changes
- IEC 62304:2006+AMD1:2015 – preview incl. table of contents
- Regulation (EU) 2017/745, Annex II (as adopted; legislation.gov.uk reproduction of the Official Journal text) — section 6.1(b)
- ISO/TR 80002-2:2017 – Validation of software for medical device quality systems (ISO)