Traceability Matrix Builder

Paste your requirements, the test cases that verify them, and the test results to get a requirements traceability matrix with coverage and verification status, and the list of requirements nothing tests. Then take the same measures into Power BI as DAX.

One row per line, commas or tabs, so a copy from Excel works; a header row is skipped. The defaults are the CSVs from the traceability matrix tutorial.

A requirement is verified when

The tutorial uses "any". "Every" is stricter: a requirement verified by a regression suite and a dedicated test isn't done until both pass. Either way, a test with several results counts as passed once any of them is a Pass.

Requirements89 test cases mapped
Coverage87.5%7 of 8 have a test
Verified62.5%5 of 8 passed
Pass rate87.5%7 of 8 results
Verified 5Failed 1Not yet run 1No test mapped 1

REQ-008 has no test case mapped, so it can't be verified at all. Coverage % shows the size of this gap, but only the list says which requirements are in it.

Traceability matrix

Mapped, test passedMapped, test failedMapped, test not run yet
RequirementStatusTC-01TC-02TC-03TC-04TC-05TC-06TC-07TC-08TC-09
REQ-001System shall power on within 5 secondsVerified2/2 passed
REQ-002System shall operate at -20C to 50CVerified
REQ-003System shall log all user actionsVerified2/2 passed
REQ-004System shall encrypt data at restVerified2/2 passed
REQ-005System shall support 100 concurrent usersFailed
REQ-006System shall provide an audible alarm on failureVerified
REQ-007System shall support firmware update without data lossNot yet run
REQ-008System shall meet MTBF of 5000 hoursNo test mapped

The same rules as DAX measures

Coverage, verification, and pass rate on the tutorial's DimRequirement, BridgeRequirementTest, and FactTestResults tables, plus a per-requirement status and color measure for the gap list.

Total Requirements =
COUNTROWS(DimRequirement)

Requirements Covered =
DISTINCTCOUNT(BridgeRequirementTest[RequirementID])

Requirements With No Test Mapped =
[Total Requirements] - [Requirements Covered]

Coverage % =
DIVIDE([Requirements Covered], [Total Requirements])

Requirements Verified =
VAR PassingTestCaseIDs =
    CALCULATETABLE(
        VALUES(FactTestResults[TestCaseID]),
        FactTestResults[Status] = "Pass"
    )
VAR VerifiedRequirementIDs =
    CALCULATETABLE(
        VALUES(BridgeRequirementTest[RequirementID]),
        FILTER(
            BridgeRequirementTest,
            BridgeRequirementTest[TestCaseID] IN PassingTestCaseIDs
        )
    )
RETURN
    COUNTROWS(VerifiedRequirementIDs)

Verified % =
DIVIDE([Requirements Verified], [Total Requirements])

Tests Executed =
COUNTROWS(FactTestResults)

Tests Passed =
CALCULATE([Tests Executed], FactTestResults[Status] = "Pass")

Pass Rate =
DIVIDE([Tests Passed], [Tests Executed])

-- One status per requirement, for a table visual with DimRequirement[RequirementID] on rows
Verification Status =
VAR PassingTestCaseIDs =
    CALCULATETABLE(
        VALUES(FactTestResults[TestCaseID]),
        FactTestResults[Status] = "Pass"
    )
VAR FailedTestCaseIDs =
    EXCEPT(
        CALCULATETABLE(
            VALUES(FactTestResults[TestCaseID]),
            FactTestResults[Status] = "Fail"
        ),
        PassingTestCaseIDs
    )
VAR HasFailedTest =
    NOT ISEMPTY(
        FILTER(
            VALUES(BridgeRequirementTest[TestCaseID]),
            BridgeRequirementTest[TestCaseID] IN FailedTestCaseIDs
        )
    )
RETURN
    IF(
        HASONEVALUE(DimRequirement[RequirementID]),
        SWITCH(
            TRUE(),
            [Requirements Covered] = 0, "No test mapped",
            [Requirements Verified] > 0, "Verified",
            HasFailedTest, "Failed",
            "Not yet run"
        )
    )

-- Row color for that table: Format > Cell elements > Background color > fx > Field value
Status Color =
SWITCH(
    [Verification Status],
    "Verified", "#34D399",
    "Failed", "#F87171",
    "Not yet run", "#FBBF24",
    "No test mapped", "#A1A1AA"
)

Free, with no sign-in and no request limit. Everything runs in your browser, and nothing you paste is sent anywhere.

Covered isn't verified. A requirement is covered as soon as a test case is mapped to it, but it isn't verified until one of those tests has passed. A failed test and a test that hasn't run are different states too, so this tool keeps all four apart: verified, failed, not yet run, and no test mapped.

The traceability matrix tutorial builds this in Power BI on a bridge table, and Coverage & Verification covers the pattern on its own. Or browse all the Power BI tools.