Requirements Traceability

Requirements traceability means linking each requirement to the testware that comes from it — test conditions, test cases, test results and the defects they reveal — and keeping those links current. The ISTQB glossary describes traceability as the degree to which a relationship can be established between two or more work products; for a tester, the relationship that matters most runs between the test basis and the tests.

A concrete example: requirement REQ-2 of a shop’s coupon feature says an expired coupon is rejected with a clear message. Test case TC-03 records Traces to: REQ-2. With that one link you can answer two questions in seconds: which tests check REQ-2, and why does TC-03 exist? Put all such links in one table and you have a requirements traceability matrix.

Why it matters

Without links, coverage is a guess. A release report that says "212 tests passed" does not tell the product owner whether the refund rules were tested at all. With traceability the report can state, requirement by requirement, which have passing tests, which have failing ones and which have none. The ISTQB Foundation syllabus lists what good traceability makes possible: evaluating coverage, determining the impact of changes, facilitating audits, helping meet IT governance criteria, and making test reports understandable to stakeholders.

For the tester it is also protection. When a requirement changes two days before a release, traceability turns "what do we need to retest?" from a debate into a lookup. When a defect escapes to production, the links show whether the requirement was never tested or was tested and the test missed the problem — two very different lessons for the team.

Requirements-to-test mapping: the traceability matrix

A requirements traceability matrix (RTM) puts the links in one table: one row per requirement, one column per test case, and a mark where a test covers a requirement. Teams often add the latest result and open defects, or keep the links in a test management tool and produce the matrix as a report. A spreadsheet is enough to start; what matters is that each link is recorded when the test is written, not rebuilt from memory before a release.

The running example of this lesson is the coupon feature of an online shop, with four requirements and five test cases. The "Traces to" field of each test case is the source; the matrix is built from it.

  • Trace at the level you test: individual requirements or acceptance criteria, not whole features or epics.
  • Write the requirement id into every test case while you design it, and into automated test names or tags.
Requirements
REQ-1  One coupon code per order
REQ-2  An expired coupon is rejected with "This coupon has expired"
REQ-3  A percentage discount applies to the items subtotal, not to delivery
REQ-4  The invoice email shows the discount on its own line

Test cases, each with its [Traces to] field
TC-01  [REQ-1, REQ-3]  Apply a valid 10% coupon to a 200.00 SAR basket
TC-02  [REQ-1]         Apply a second coupon to the same order
TC-03  [REQ-2]         Apply a coupon that expired yesterday
TC-04  [REQ-3]         Apply a 10% coupon: 100.00 SAR basket, 15.00 SAR delivery fee
TC-05  [none]          Enter the coupon code in lower case

Matrix built from those fields
RTM     TC-01  TC-02  TC-03  TC-04  TC-05
REQ-1     x      x
REQ-2                   x
REQ-3     x                    x
REQ-4

Try it: Requirements → Test Cases Try it: Requirements → Test Scenarios

Forward and backward traceability

Forward traceability follows each requirement to its tests, and on to their results and defects. In the matrix you read along a row, and the question is "is everything we promised tested?". In the coupon example the REQ-4 row is empty: nobody tests the invoice email, so no report can claim that REQ-4 works.

Backward traceability follows each test case or defect back to the requirement it comes from. In the matrix you read down a column, and the question is "why does this test exist?". The TC-05 column is empty: a test for lower-case coupon codes that no requirement asks for. Keeping links that can be followed both ways is called bidirectional traceability; a matrix gives you both readings from the same marks. The ISTQB syllabus does not name these directions: forward, backward and bidirectional are common industry terms.

Every gap is a question for the team, not an automatic fix:

The coupon feature’s traceability matrix read both ways: along the rows, forward, REQ-4 has no test; down the columns, backward, TC-05 traces to no requirement.
Requirement / test caseTC-01valid 10% couponTC-02second couponTC-03expired yesterdayTC-04delivery not discountedTC-05lower-case codeForward: tested byread the row
REQ-1one coupon per orderlinkedlinkedno linkno linkno link2 tests
REQ-2expired coupon rejectedno linkno linklinkedno linkno link1 test
REQ-3discount on items, not deliverylinkedno linkno linklinkedno link2 tests
REQ-4discount line in invoice emailno linkno linkno linkno linkno linkno test
Backward: traces toread the columnREQ-1, REQ-3REQ-1REQ-2REQ-3no requirement2 gaps to ask about
  • linked: the test checks this requirement
  • gap: a question for the team, not an automatic fix

Each mark comes from a test case’s Traces to field; the last column and the last row are the two readings, not extra data.

  • A requirement with no test (REQ-4): design one, or record why it is not tested here — out of scope, covered at another test level, or a risk the product owner accepts.
  • A test with no requirement (TC-05): either a requirement is missing — case-insensitive codes may be exactly what the business wants, so ask and get it written down — or the test checks something nobody needs and should be retired.
  • A defect that traces to no requirement: often an unwritten expectation; raise it in defect triage so the requirement is added or clarified.

Worked example: impact analysis for a changed requirement

Impact analysis means working out what a change will affect before it is built and released; done early, it can even help decide whether the change should be made. Traceability makes the testing part of it quick and explainable. A month after the coupon feature shipped, the product owner raises change request CR-12: "The coupon discount is capped at 50.00 SAR per order." It modifies REQ-3.

First compare the old and the new wording to see exactly what changed. Then follow the changed requirement forward, read each affected test backward to see what else it covers, decide whether each test stays, changes or is joined by new ones, and ask about what the matrix cannot show.

  • The matrix narrowed the work to one requirement, two existing tests that keep their expected results, and three new ones, instead of "retest coupons".
  • The matrix could not show the impact on REQ-4: it holds recorded links, not every place the discount is used. Ask the developer which code and screens read the discount.
CR-12: the coupon discount is capped at 50.00 SAR per order (changes REQ-3)

1. Forward from REQ-3: TC-01, TC-04
2. Backward from those tests: TC-01 also covers REQ-1, so any edit must keep that check
3. Review: TC-01 gives a 20.00 discount and TC-04 a 10.00 discount, both below the cap.
   Both expected results stay unchanged.
4. New tests for REQ-3:
   TC-06  10% of 400.00: discount 40.00 (below the cap)
   TC-07  10% of 500.00: discount 50.00 (at the cap)
   TC-08  10% of 800.00: discount 50.00, not 80.00 (above the cap)
5. Beyond the matrix: REQ-4 (invoice email) must show the capped amount and still
   has no test, so add TC-09. Ask the developer which other code reads the discount.
6. Run TC-01, TC-04 and TC-06 to TC-09 on the new build, plus the regression tests the
   team selects, and add the new links to the matrix.

Try it: Text Diff Try it: Regression Scenario Generator

Common mistakes

  • Building the matrix at the end, for an audit or a report, instead of recording each link when the test case is written. A matrix rebuilt from memory is guesswork.
  • Tracing to a whole feature or epic: one happy-path test then marks "Coupons" as covered while three of its four rules are untested.
  • Reading a link as proof of enough testing. A filled cell says a test exists, not that it checks the right values or that it passed on this build.
  • Deleting tests with no requirement without asking, or ignoring them: each is either a missing requirement or an obsolete test, and the product owner decides which.
  • Letting the links go stale: requirements are split, renumbered or removed while the matrix still points at the old ids, so impact analysis gives a wrong answer.

The QA perspective

On a working team traceability is mostly a habit, not a document: the requirement or acceptance criterion id goes on every test condition and test case, into automated test names or tags, and onto every defect report. Agree with the team where the links live — a test management tool, the issue tracker or a shared sheet — so there is one source that developers and the product owner can read too.

Use the links when they matter. In refinement, ask for ids and acceptance criteria that tests can reference. Before a release, report per requirement: "REQ-3: 5 linked tests, all passed on build 58; REQ-2: its only test failed, defect D-41 open". When a change request arrives, run the forward and backward check before you estimate the retest effort. Keep the matrix only as detailed as the team will maintain.

Practice exercise

Trace a class booking feature and analyse a change

Your task

A gym app has the four requirements and six test cases below; each test’s requirement is in brackets. Build the traceability matrix, read it forward and backward, and write down each gap with the action or question it calls for.

Then the product owner raises CR-4: free cancellation now ends 12 hours before the class instead of 24. Use the matrix to decide which tests to review, which to add and what to ask.

Material
REQ-1  A member can book at most 2 classes per day
REQ-2  Booking closes 1 hour before the class starts
REQ-3  Cancellation is free until 24 hours before the class; later, a fee applies
REQ-4  A full class offers a place on a waiting list

TC-01  [REQ-1, REQ-2]  Book 2 classes on the same day, each 3 hours ahead
TC-02  [REQ-1]         Try to book a 3rd class on the same day
TC-03  [REQ-2]         Try to book 30 minutes before the class starts
TC-04  [REQ-3]         Cancel 30 hours before the class: no fee
TC-05  [REQ-3]         Cancel 2 hours before the class: fee charged
TC-06  [none]          The class page shows the instructor’s photo
Steps
  1. Draw the matrix: a row per requirement, a column per test case, a mark per link.
  2. Read every row (forward) and every column (backward); list the gaps.
  3. For CR-4, follow REQ-3 forward, check what else those tests cover, and mark each test unchanged, to update or new.
  4. Note what the matrix cannot tell you and whom you will ask.
Show the model answer
Model answer

Matrix: REQ-1 → TC-01, TC-02; REQ-2 → TC-01, TC-03; REQ-3 → TC-04, TC-05; REQ-4 → no test. Column TC-06 → no requirement.

Forward gap: REQ-4 has no test. Design one (a member joins the waiting list of a full class and gets the place when someone cancels), or record why it is not tested here. Backward gap: TC-06 traces to nothing. Ask the product owner whether a requirement about instructor photos is missing or the test should be retired.

CR-4 impact: REQ-3 leads to TC-04 and TC-05, which cover nothing else. Their expected results stay the same (30 hours ahead is still free, 2 hours ahead still costs a fee), so review them without rewriting. Add a test that cancels 20 hours ahead, now free but charged before, and tests around the 12-hour limit once the product owner confirms whether exactly 12 hours ahead is still free.

Beyond the matrix, ask: do the booking confirmation, the reminders or the terms page say "24 hours"? Do classes booked before the change keep the old rule? Then run the REQ-3 tests on the new build and add the new test ids to the matrix.

Frequently asked questions

Do agile teams still need a traceability matrix?

They need traceability, not necessarily a separate spreadsheet. Linking test cases, automated tests and defects to user stories and their acceptance criteria in the team’s tools gives the same answers, and the matrix becomes a report produced from those links. Its size and formality should match the product’s risk and any regulatory needs.

What is the difference between traceability and test coverage?

Traceability is the set of links between work products. Requirements coverage is a measure computed from those links: the share of requirements whose tests ran on a given build, and the share whose tests passed. Without traceability you cannot calculate requirements coverage; with it, you still have to judge whether the linked tests are enough.

What is bidirectional traceability?

Links that can be followed both ways: from each requirement to its tests (forward) and from each test or defect back to its requirement (backward). It is not a separate document: if every test case records the requirement it covers, the same links answer both questions.

References

Practise with Mutqan tools

Convert a list of numbered requirements into traceable test cases with a requirement-to-test matrix.

Test Design

Compare two texts line by line or word by word and highlight differences.

Formatting

Compare requirements or a user story against existing test cases to find untested areas, with Mutqan AI.

Test Optimization AI

Go deeper

Your progress on this topic

Part of the QA Roadmap