How To Create Requirements Traceability Matrix (RTM)?

In the comments and over email we received multiple requests on What is Requirements Traceability Matrix (RTM)? and how to create it. Today we going to explain RTM in simple terms with example.

A matrix can be defined as a rectangular array that consists of rows and columns. The intersection of a row and column is an element that holds a value or expression. Using the similar concept in software testing, the traceability matrix is formulated which can be used to establish the correlation between any two baselined documents. Such co-relation could be of many-to-many relationship type in order to check the completeness of the relationship between these baselined documents.

What is Requirements Traceability Matrix (RTM)?

RTM is very helpful in tracking the requirements and check if they are properly met for the current project. It traces the relationship between the software requirements provided by the business or client and their traceability in a single document brought at the conclusion of the life-cycle. Alternatively, it can be explained as a document which is used to map and trace user requirements against the test cases. This practice will help to make sure that all the test cases are well developed so that none of the functionality has missed during the software testing.

Requirement Traceability Matrix

How to create RTM?

Requirements Traceability Matrix is a simple tabular documents which could have the following parameters. It is not mandatory to always use all the fields in a RTM document.

  • Business Requirement ID
  • Requirement Type
  • Requirement Description
  • Functional Requirement ID
  • Trace to Design specification
  • Test Case ID
  • Unit test cases
  • Integration test cases
  • System test cases
  • User acceptance test cases
  • Trace to test script
  • Risks

Traceability Test Matrix Types:

Traceability Test Matrix can be of the following types.

  • Forward traceability: As the name suggests, it is used to ensure if the project progression is in the desired forward direction and we are building the right product. It helps to makes sure that each of the requirement is applicable to the product and tested thoroughly. It is a mapping between requirements and test cases.
  • Reverse or Backward Traceability: As the name suggests, it is used to ensure if the current software product is on the right track. It helps to makes sure that the scope of project is not extended by the addition of code, design elements, test, etc. which is not specified earlier in the original requirements. It is a mapping between requirements and test cases in reverse.
  • Bi-directional Traceability (Forward + Reverse): It is used to ensures that we have covered all the requirements against the test cases. Further, it helps to analyze the impact of a change in original requirements which is affected by the identification of defects in a work product under development and vice versa.

Example on the creation of RTM:

In the following example, we are going to use two base line documents i.e. BRD (Business Requirement Document) and Functional Requirement Document (FRD) to write Test Cases and later map all of these documents into Requirements Traceability Matrix (RTM). We are going to consider the requirement to login into college portal which accept three inputs. They are USERID, PASSWORD and USER ROLE. The following are the steps.

STEP 1: Our BRD (Business Requirement Document) will look as shown below.

Business Requirement (BSR)Module NameUser RoleBusiness Requirement Description
BSR1Application Login and LogoutStudent, Professor, Dean, StaffA student can login with correct username and password (i.e. credentials) only if user role is selected as ‘Student’. Similarly it applies to user role as Professor, Dean, and Staff.
BSR2Profile PageStudent, Professor, Dean, StaffStudent, Professor, Dean, and Staff post successful login could see their profile details not the other profiles.
BSR3Task AssignmentStudent, Professor, Dean, StaffStudent can accept or decline assignments assigned by Professor. Dean can approve and disapprove the assignment assigned by professor. Professor can approve and disapprove assignment submitted by Student. Staff is to capture the grade and marks submitted by professor towards student assignment.

STEP 2: Our corresponding (Functional requirement Document) FRD will look as shown below.

Functional Requirement (FTR)Description
FTR1User ID is a required field and cannot be empty.
FTR2Password is a required field and cannot be empty.
FTR3User role is a required field and should be chosen among Student, Professor, Dean, Staff.
FTR4User ID, Password, and User Role are valid. Login Successful.
FTR5If User ID or Password is wrong but User Role is valid. Login Unsuccessful.
FTR6If User ID and Password are correct but User Role is invalid. Login Unsuccessful.
FTR7Student, Professor, Dean, Staff can see their receptive profile page.
FTR8Assignment Task can only be assigned by Professor.
FTR9Student can accept or decline the assignment Task.
FTR10Dean can approve or disapprove the assignment accepted by Student.
FTR11Professor can approve or disapprove the assignment submitted by Student.
FTR12Staff can capture the grade or marks provided by Professor towards Student’s assignment.

STEP 3: Testing team can use these two documents (i.e. BRD and FRD) and start preparing test cases (say the Test case covers successful login).

Test Case IDTest Case NameTest StepsTest DataExpected Result
TC1Successful Login1) Browse the Login page URL.
2) Enter correct user ID
3) Enter Correct password
4) Enter correct user role
Userid=abc123

 

Password=123456

User Role= STUDENT

Successful Login and profile page is visible.
TC2Unsuccessful Login due to invalid username and password1) Browse the Login page URL.

 

2) Enter correct user ID

3) Enter wrong password

4) Enter correct user role

Userid=abc123

 

Password=wrong

User Role= STUDENT

Unsuccessful Login and Login page will show error.
TC3Unsuccessful Login due to invalid user role1) Browse the Login page URL.
2) Enter correct user ID
3) Enter Correct password
4) Enter wrong user role
Userid=abc123

 

Password=123456

User Role= DEAN

Unsuccessful Login and Login page will show error.

STEP 4: Let’s map the Business Requirement ID (BSR), and Functional Requirement ID (FTR) to the above Test Case. Above table will look as shown below.

Test Case IDBSRFTRTest Case NameTest StepsTest DataExpected Result
TC1BSR1FTR4Successful Login1) Browse the Login page URL.
2) Enter correct user ID
3) Enter Correct password
4) Enter correct user role
Userid=abc123

 

Password=123456

User Role= STUDENT

Successful Login and profile page is visible.
TC2BSR1FTR5Unsuccessful Login due to invalid username and password1) Browse the Login page URL.
2) Enter correct user ID
3) Enter wrong password
4) Enter correct user role
Userid=abc123

 

Password=wrong

User Role= STUDENT

Unsuccessful Login and Login page will show error.
TC3BSR1FTR6Unsuccessful Login due to invalid user role1) Browse the Login page URL.
2) Enter correct user ID
3) Enter Correct password
4) Enter wrong user role
Userid=abc123

 

Password=123456

User Role= DEAN

Unsuccessful Login and Login page will show error.

STEP 5: Likewise, complete above relationship table for all test cases and in the next step but extract the first three columns of the table i.e. Test Case ID (TC), Business Requirement ID (BSR), and Functional Requirement ID (FTR). It is nothing but you’re Requirements Traceability Matrix (RTM).

Test Case IDBusiness Requirement ID (BSR)Functional Requirement ID (FTR)
TC1BSR1FTR4
TC2BSR1FTR5
TC3BSR1FTR6

Conclusion

In this article, we have discussed the Requirement traceability matrix (RTM) and prepared one as an example by using its concept.
Are you using RTM in your company, why don’t you share your experience on Requirement traceability matrix in below comment for our QA friends.


⇓ Subscribe Us ⇓


If you are not regular reader of this website then highly recommends you to Sign up for our free email newsletter!! Sign up just providing your email address below:


 

Check email in your inbox for confirmation to get latest updates Software Testing for free.


  Happy Testing!!!
 

Leave a Comment

Share This Post