Why Traceability Matters

Requirements traceability answers three critical questions:

  1. Is every requirement tested? Forward traceability — no untested features
  2. Does every test have a purpose? Backward traceability — no orphan tests
  3. If a requirement changes, which tests need updating? Impact analysis

Without traceability, you cannot confidently say “we tested everything that matters.”

The Requirements Traceability Matrix

Basic RTM Structure

Req IDRequirementTest Case IDsCoverageStatus
REQ-001User can register with emailTC-001, TC-002, TC-003FullPassed
REQ-002Password must meet complexity rulesTC-010, TC-011, TC-012Full2/3 Passed
REQ-003Two-factor authenticationNoneNot tested
REQ-004Session timeout after 30 minTC-020PartialPassed

Reading the RTM

  • REQ-001: Fully covered with 3 test cases, all passing
  • REQ-002: Covered but 1 test failing — investigate
  • REQ-003: No test cases mapped — critical gap
  • REQ-004: Only 1 test case — may need more scenarios (timeout at exactly 30 min, timeout reset on activity, etc.)

Creating an RTM

Step 1: List All Requirements

Gather from requirements documents, user stories, acceptance criteria.

Step 2: Map Test Cases

For each requirement, identify which test cases verify it. One requirement may have multiple test cases. One test case may cover multiple requirements.

Step 3: Identify Gaps

  • Requirements with no test cases = untested functionality
  • Test cases with no requirements = potential orphan tests (or missing requirements)

Step 4: Assess Coverage Quality

Having a test case mapped does not mean adequate coverage. Evaluate if the test cases cover positive, negative, and boundary scenarios.

Bidirectional Traceability

Forward (Requirement → Test): Every requirement has at least one test case. Backward (Test → Requirement): Every test case traces to at least one requirement.

DirectionFindsAction
Forward gapsUntested requirementsWrite test cases
Backward gapsOrphan test casesRemove or link to requirement
Many-to-many linksComplex dependenciesReview for simplification

Tools for Traceability

ToolApproach
SpreadsheetManual, simple, error-prone at scale
Jira + XrayLink stories to test cases natively
Jira + ZephyrTest cases linked to requirements
Azure DevOpsBuilt-in work item linking
TestRailRequirements integration module

Exercise: Build an RTM

Given these 8 requirements for a file sharing application, create an RTM and identify coverage gaps:

Requirements:

  1. Users can upload files up to 100MB
  2. Users can share files via email link
  3. Shared links expire after 7 days
  4. Users can set password protection on shared links
  5. File versioning — keep last 5 versions
  6. Admin can set storage quotas per user
  7. Files are encrypted at rest
  8. Activity audit log for all file operations

Existing test cases: TC-001 (upload 50MB file), TC-002 (upload 101MB file rejected), TC-003 (share via email), TC-004 (open shared link), TC-005 (password protected link), TC-006 (upload new version), TC-007 (admin set quota).

Solution
ReqRequirementTest CasesCoverageGaps
R1Upload up to 100MBTC-001, TC-002GoodAdd: exactly 100MB boundary, 0-byte file
R2Share via emailTC-003, TC-004PartialAdd: invalid email, multiple recipients
R3Links expire 7 daysNONECritical gap: no expiry tests
R4Password protectionTC-005PartialAdd: wrong password, empty password
R5File versioning (5)TC-006PartialAdd: 6th version (should delete oldest), view older version
R6Admin quotasTC-007PartialAdd: exceed quota, quota near limit
R7Encryption at restNONECritical gap: no encryption verification
R8Audit logNONECritical gap: no audit log tests

Critical gaps: R3 (link expiry), R7 (encryption), R8 (audit log) have zero coverage. These need immediate test case creation, especially R7 (security) and R8 (compliance).

Orphan test check: All existing test cases map to requirements — no orphans.

Key Takeaways

  • An RTM maps requirements to test cases, revealing coverage gaps
  • Bidirectional traceability catches both untested requirements and orphan tests
  • Requirements with no test cases are blind spots — prioritize based on risk
  • Maintain the RTM throughout the project — it is a living document
  • Use tools (Jira+Xray, Azure DevOps) to automate traceability where possible