What is Requirements Traceability Matrix (RTM) in Testing?

What is Traceability Matrix (TM)?

A Traceability Matrix is a document that co-relates any two-baseline documents that require a many-to-many relationship to check the completeness of the relationship.

It is used to track the requirements and to check the current project requirements are met.

What is Requirement Traceability Matrix?

Requirement Traceability Matrix (RTM) is a document that maps and traces user requirement with test cases. It captures all requirements proposed by the client and requirement traceability in a single document, delivered at the conclusion of the Software development life cycle. The main purpose of Requirement Traceability Matrix is to validate that all requirements are checked via test cases such that no functionality is unchecked during Software testing.

Why RTM is Important?

The main agenda of every tester should be to understand the client’s requirement and make sure that the output product should be defect-free. To achieve this goal, every QA should understand the requirement thoroughly and create positive and negative test cases.

This would mean that the software requirements provided by the client have to be further split into different scenarios and further to test cases. Each of this case has to be executed individually.

A question arises here on how to make sure that the requirement is tested considering all possible scenarios/cases? How to ensure that any requirement is not left out of the testing cycle?

A simple way is to trace the requirement with its corresponding test scenarios and test cases. This merely is termed as ‘Requirement Traceability Matrix.’

The traceability matrix is typically a worksheet that contains the requirements with its all possible test scenarios and cases and their current state, i.e. if they have been passed or failed. This would help the testing team to understand the level of testing activities done for the specific product.

Which Parameters to include in Requirement Traceability Matrix?

  • Requirement ID
  • Requirement Type and Description
  • Test Cases with Status

Requirements Traceability Matrix

Above is a sample requirement traceability matrix.

But in a typical software testing project, the traceability matrix would have more than these parameters.

Requirements Traceability Matrix

As illustrated above, a requirement traceability matrix can:

  • Show the requirement coverage in the number of test cases
  • Design status as well as execution status for the specific test case
  • If there is any User Acceptance test to be done by the users, then UAT status can also be captured in the same matrix.
  • The related defects and the current state can also be mentioned in the same matrix.

This kind of matrix would be providing One Stop Shop for all the testing activities.

Apart from maintaining an excel separately. A testing team can also opt for requirements tracing available Test Management Tools.

Types of Traceability Test Matrix

In Software Engineering, traceability matrix can be divided into three major component as mentioned below:

  • Forward traceability: This matrix is used to check whether the project progresses in the desired direction and for the right product. It makes sure that each requirement is applied to the product and that each requirement is tested thoroughly. It maps requirements to test cases.
  • Backward or reverse traceability: It is used to ensure whether the current product remains on the right track. The purpose behind this type of traceability is to verify that we are not expanding the scope of the project by adding code, design elements, test or other work that is not specified in the requirements. It maps test cases to requirements.
  • Bi-directional traceability ( Forward+Backward): This traceability matrix ensures that all requirements are covered by test cases. It analyzes the impact of a change in requirements affected by the Defect in a work product and vice versa.

How to create Requirement Traceability Matrix

Let’s understand the concept of Requirement Traceability Matrix through a Guru99 banking project.

On the basis of the Business Requirement Document (BRD) and Technical Requirement Document (TRD), testers start writing test cases.

Let suppose, the following table is our Business Requirement Document or BRD for Guru99 banking project.

Here the scenario is that the customer should be able to login to Guru99 banking website with the correct password and user#id while manager should be able to login to the website through customer login page.

How to Create Requirements Traceability Matrix (RTM)

While the below table is our Technical Requirement Document (TRD).

How to Create Requirements Traceability Matrix (RTM)

Note: QA teams do not document the BRD and TRD. Also, some companies use Function Requirement Documents (FRD) which are similar to Technical Requirement Document but the process of creating Traceability Matrix remains the same.

Let’s Go Ahead and create RTM in Testing

Step 1) Our sample Test Case is

“Verify Login, when correct ID and Password is entered, it should log in successfully”

How to Create Requirements Traceability Matrix (RTM)

Step 2) Identify the Technical Requirement that this test case is verifying. For our test case, the technical requirement is T94 is being verified.

How to Create Requirements Traceability Matrix (RTM)

Step 3) Note this Technical Requirement (T94) in the Test Case.

How to Create Requirements Traceability Matrix (RTM)

Step 4) Identify the Business Requirement for which this TR (Technical Requirement-T94) is defined

How to Create Requirements Traceability Matrix (RTM)

Step 5) Note the BR (Business Requirement) in Test Case

How to Create Requirements Traceability Matrix (RTM)

Step 6) Do above for all Test Cases. Later Extract the First 3 Columns from your Test Suite. RTM in testing is Ready!

How to Create Requirements Traceability Matrix (RTM)

Advantage of Requirement Traceability Matrix

  • It confirms 100% test coverage
  • It highlights any requirements missing or document inconsistencies
  • It shows the overall defects or execution status with a focus on business requirements
  • It helps in analyzing or estimating the impact on the QA team’s work with respect to revisiting or re-working on the test cases

Let’s learn RTM with an example in the Video

Click here if the video is not accessible

Requirements Traceability Matrix (RTM) Template

Click below to download RTM Template Excel File

Download the RTM Template Excel(.xlsx)