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.

Boundaries of the example. The extract has six requirements, five user needs and four risk controls. It is not a complete specification. No device qualification, device class or IEC 62304 software safety class is assigned. Clinical evaluation, usability and cybersecurity records are out of scope. All IDs, dates and results are invented, and test results are simulated. The same fictional product appears in our internal audit guide, the supplier qualification guide and the CAPA guide.

How the matrix is structured

The downloadable template uses one row per requirement-to-test relationship and groups the columns as follows:

Columns in the software traceability analysis template
Column groupColumnsWhat to record
RequirementRequirement ID; title or descriptionOne row per requirement-to-test relationship. Repeat the requirement ID when several test cases cover it.
Identified risksRisk ID and short descriptionThe risk or risk control the requirement relates to, with a reference to the risk management file, or “None”.
Testing referenceTest case ID; description; reference to the test record; status; date; responsible personWhat was tested, where the controlled record is, the result (Pass, Fail, Blocked, Not run), and who ran it when.
Defect referenceDefect found; defect ID; severity; defect status; closed before releaseDefects raised by the test, their severity (Blocker to Trivial, defined on the Legend tab) and whether they were closed before the product release.
Test executionTest, UAT and production environmentsWhere 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:

Forward trace for Example SaMD A, baseline 1.1
User needRequirementRisk control (hazard)VerificationResult, build, evidence
EX-UN-01 Reviewer is sure the report belongs to the patientEX-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 reviewedEX-REQ-002 Show “Unreviewed” until an authorised reviewer confirmsEX-RC-02 (EX-HAZ-02 unreviewed taken as reviewed)EX-TST-002Pass · 1.1.0-rc2 · EX-VER-002
EX-UN-03 Ward staff know the report reached the record systemEX-REQ-003 “Delivery pending” until acknowledged; never “Delivered” without acknowledgement (rev. B)EX-RC-03 (EX-HAZ-03 false delivery)EX-TST-003Pass · 1.1.0-rc2 · EX-VER-003
EX-UN-05 Quality team can reconstruct the version that produced a reportEX-REQ-004 Store the processing version with each reportN/A — supports investigation; not a risk control in EX-RMF-01EX-TST-004Pass · 1.1.0-rc2 · EX-VER-004
EX-UN-04 Only authorised reviewers approve; approvals are attributableEX-REQ-005 Approval only for the authorised reviewer roleEX-RC-04 (EX-HAZ-04 unauthorised approval)EX-TST-005Pass · 1.1.0-rc2 · EX-VER-005
EX-UN-04 (as above)EX-REQ-006 Record identity, role, timestamp and report version for each reviewN/A — attribution record; not a risk control in EX-RMF-01EX-TST-006Pass · 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:

Gaps found in the Example SaMD A matrix
GapHow it was foundWhat it wasHow it was closed
EX-GAP-001Internal audit, 3 Aug (finding EX-NC-001)Missing link: EX-REQ-006 had no test in candidate 1.0EX-TST-006 added and passed on 1.1; the process cause went to CAPA EX-CAPA-001 (see the CAPA guide)
EX-GAP-002Coverage review of 1.1-rc1Inadequate coverage: the test for EX-REQ-001 passed but covered only the negative caseEX-TST-007 added for the matching case
EX-GAP-003Trace review before release reviewBaseline mismatch: EX-REQ-003 revised for 1.1; its test still carried a 1.0 resultEX-TST-003 re-executed on build 1.1.0-rc2
EX-GAP-004Supplier change EX-SCN-003 accepted, 9 OctPlanned change: the delivery API will add an error code in candidate 1.2Open, 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:

Audit snapshot of candidate 1.0 compared with baseline 1.1
RequirementCandidate 1.0 (audit, 3 Aug)Baseline 1.1 (28 Sep)
EX-REQ-001EX-TST-001 · Pass · CompleteEX-TST-001 and EX-TST-007 · Pass · Complete
EX-REQ-003EX-TST-003 · Pass · Complete (revision A)Revision B · EX-TST-003 re-run · Complete
EX-REQ-006No linked testEX-TST-006 · Pass · Complete
Other threeCompleteComplete
Don’t stop at “Pass”. A test can pass while a defect it raised stays open. The template records the defect ID, its severity (Blocker to Trivial), its status and whether it was closed before release. Anything still open at release goes into your evaluation of known anomalies.

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.

Three different questions about a requirement
QuestionAnswered byExample of “no”
Is there a test?A link in the matrixEX-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 recordEX-TST-003 had passed, but on the earlier baseline, before EX-REQ-003 was revised.
Is the testing enough?A recorded human judgement of coverageEX-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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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 — templateXLSX · 14 KB · v1.0 · Nov 2026 · TTM-TPL-TRC-01Requirement 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