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.
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 Name | User Role | Business Requirement Description |
BSR1 | Application Login and Logout | Student, Professor, Dean, Staff | A 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. |
BSR2 | Profile Page | Student, Professor, Dean, Staff | Student, Professor, Dean, and Staff post successful login could see their profile details not the other profiles. |
BSR3 | Task Assignment | Student, Professor, Dean, Staff | Student 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 |
FTR1 | User ID is a required field and cannot be empty. |
FTR2 | Password is a required field and cannot be empty. |
FTR3 | User role is a required field and should be chosen among Student, Professor, Dean, Staff. |
FTR4 | User ID, Password, and User Role are valid. Login Successful. |
FTR5 | If User ID or Password is wrong but User Role is valid. Login Unsuccessful. |
FTR6 | If User ID and Password are correct but User Role is invalid. Login Unsuccessful. |
FTR7 | Student, Professor, Dean, Staff can see their receptive profile page. |
FTR8 | Assignment Task can only be assigned by Professor. |
FTR9 | Student can accept or decline the assignment Task. |
FTR10 | Dean can approve or disapprove the assignment accepted by Student. |
FTR11 | Professor can approve or disapprove the assignment submitted by Student. |
FTR12 | Staff 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 ID | Test Case Name | Test Steps | Test Data | Expected Result |
TC1 | Successful Login | 1) 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. |
TC2 | Unsuccessful Login due to invalid username and password | 1) 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. |
TC3 | Unsuccessful Login due to invalid user role | 1) 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 ID | BSR | FTR | Test Case Name | Test Steps | Test Data | Expected Result |
TC1 | BSR1 | FTR4 | Successful Login | 1) 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. |
TC2 | BSR1 | FTR5 | Unsuccessful Login due to invalid username and password | 1) 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. |
TC3 | BSR1 | FTR6 | Unsuccessful Login due to invalid user role | 1) 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 ID | Business Requirement ID (BSR) | Functional Requirement ID (FTR) |
TC1 | BSR1 | FTR4 |
TC2 | BSR1 | FTR5 |
TC3 | BSR1 | FTR6 |
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:
Happy Testing!!!
- 15 Tips on How to make your software testing more efficient?
- Why Documentation is Important in Software Testing?
- How To Optimize The Testing Process and Reduce Development Costs?
- What should be done after a bug is found (Bug Defect Tracking)?
- What is Software Testing?
- What is Test data & guidelines to design your Test Data?
- Better Requirements Better Testability
- What is Reliability Testing?
- Involvement Of Stakeholders In Testing
- Why Many People Don’t Like Software Testing?