Requirement Traceability Matrix (RTM) Meaning: When you have attended an interview, you face a question regarding the requirement traceability matrix. So, in this post, we will briefly discuss the requirement traceability matrix in detail and how to create a requirement traceability matrix.
What is the Traceability matrix?
A traceability matrix is a document or artifact that co-relates any two based lined documents having a many-to-many relationship and helps check the relationship’s completeness. With this document, the client can easily find out or track their requirements and validate that it covers and meets all project requirements.
What is the Requirement Traceability Matrix?
A requirement traceability matrix ( RTM in testing ) is a high-level document that maps and traces user requirements with test cases to ensure that an adequate testing level is achieved for every requirement. The main purpose of the requirement traceability matrix is to see that all test cases are covered and confirm that no functionality is missed during the testing of the application. It also helps to identify coverage gaps. From this document, we can also get a clear idea about the number of test cases that are run, passed, failed, blocked, etc., for the requirement.
RTM helps us accurately link various artifacts like BRD, test cases, and defects. As a parallel, we will work with various documents, so in that case, with the help of RTM, we can easily track everything. Also, it ensures a good-quality product as all the features of that application are tested.
Purpose Of Requirement Traceability Matrix
The purpose of the Requirement Traceability Matrix [RTM], is to link the requirements collected during requirement specification analysis to the technical requirements and the test data. RTM specifies all the requirements and their traceability and is delivered at the completion of the Software development lifecycle.
Creating RTM focuses on linking the requirements to the test cases and ensuring no requirements are missed. The validation process during testing is traced by using the RTM.
Requirement Traceability Matrix contains the details as follows:
- Type of the Requirement
- Design Specifications.
- Variety of Test cases ( Unit Test cases, Integration Test Cases, System Test Cases, User Acceptance Test Cases ).
- Test Script Validation.
Requirements Traceability Matrix Example
The Requirement Traceability Matrix is based on the Business Requirement Document[BRD], Technical Requirement Document[TRD], and the Test Case Document.
For example, consider the Garment Stock Management System, which manages the stock and generates reports on the completion of production.
Consider the feature – “Adding Raw Items Required for each product.“
The Business Development Document for this scenario is given below:
|BR1||Login and Logout||Admin, Manager, Employee||Admin: Login.|
Homepage with all the master settings.
|BR2||Raw Material Management||Admin, Manager||Manage the Raw materials|
|BR3||Product Management||Admin, Manager||Manage the Products|
|BR4||Manage Product-Item Configuration||Admin, Manager||Add the product details, and Configure each product with the corresponding raw items.|
|BR5||Order management||Admin, Manager, Employee||Order processing: Production order, Purchase Order|
The manager should be able to set the product item configuration, i.e., the raw materials required for the production of each product.
The Technical Requirement Document[TRD] for the scenario is given below:
|TR120||The Product Name Should be selected|
|TR121||“Add More” button for adding more RowItems|
|TR122||At least one Row Material should be given|
The Requirement Traceability Matrix [RTM] is created based on the below data.
|Testcase#||Test Case||Tests||TestData||Expected Result|
|TC200||Verify the Product Name||Select the Product from the combo box.||Value=” BodyFit”||Should list the data in the Combo to get selected|
|TC201||Direct Entry in the Combo box||Try to enter direct values in the Combo box||Value=”Not Fit”||Should not accept direct entry in the combo box|
- Step 1: Create the Test Case Document
- Step 2: Identify the Technical requirement matching this Test Case
- Step 3: Identify the Business Requirement(BR) for the TR found
- Step 4: Identify the Business Requirement in Test Case
- Step 5: Create the Requirement Traceability Matrix by analyzing the above matrices and data
|Business Requirement||Technical Requirement||Test Case|
Types of Traceability Matrix:
The traceability matrix is mainly divided into three types:
- Forward traceability: as the name suggests, we can think about what is used to ensure that the project progresses forward and we are building the right product as per the BRD. It also ensures that the product is developed and even tested thoroughly. It creates a map between the requirement document and test cases.
- Backward traceability: the main purpose is to ensure that we are developing the product on the right track and to find out that no extra and unspecified functionality is added to the project. Because of that, the scope of the project is affected.
- Bi-directional Traceability: this is called bi-directional traceability because here, the mapping is done between requirement and test cases and vice versa. It ensures that all test cases can be traced to requirements and you have specified valid and accurate test cases for every requirement.
Advantages of RTM
- From the document, we can find out the % of test coverage. So, it helps to get 100% test coverage.
- It also helps us to find the missing functionality of the product easily.
- When some requirement changes happen, we can easily find out which test cases need to be updated from the requirement traceability matrix.
- Tracking the execution status of the test cases also helps us find the test execution status.
- The important benefit of using RTM is that RTM ensures full test coverage without failure.
- Analyses all the test cases and compares the test cases with the technical requirements and the business requirements.
- Detects any missing requirements effectively.
- RTM can reduce the time for verifying the test coverage.
Do the Traceability Matrix Requirements Help in Developing and Testing the Project?
The RTM can be used to trace all the phases of the project development. It also assists the functionalities of process control and quality management. RTM captures all the requirements specified by the client and the actual functioning of the requirements in the developer’s view. So, the document is helpful to trace whether all the requirements are completed to deliver the expected output.
The matrix can be used for the evaluation of the testing process. In some cases, the RTM can also be used as a test planning tool as it helps to determine how many tests are required. By analyzing the RTM, the testers can identify the testing types, the tools required for testing, and the re-tests needed for specific requirements.
The project Managers or The team leads are responsible for preparing the Requirement Traceability Matrix[RTM]. The document will be updated with the subsequent changes by the team leads processing each project module.
The RTM is prepared when all the test case writings are completed and the test environment or just before executing the test cases. This is the phase at which the project manager should ensure that no requirement is missed during the project development.
There are a number of tools for generating Requirement Traceability Matrix[RTM], known as Test Management Tools.
Eg, HP-QC, QAComplete, QMetry, PractiTest, etc.
Out of these Test management tools, HP Quality Control [ HP-QC] by Hewlett-Packard is widely used to generate Requirement Traceability Matrix.
Some features of HP-QC are given below:
- Requirements directly map to the test cases: When RTM is created, clicking on the defect will redirect to the relevant requirement and connected test cases.
- Email Notifications: Customized Email notifications to communicate the status of the defects and the reports.
- Analysis and Report: Allow users to generate reports using graphs, pie charts, etc.
- MS Excel Integration: Can integrate easily with MS Excel
- Easy Script Integration: Can Integrate the Test Case scripts easily
Traceability Matrix Template: For creating the template, some organizations use MS Excel, and some organizations use paid tools where you can write test cases. Based on that, it will automatically create Requirement Traceability Matrix (RTM) for you. One such type of tool is qTest. Using this tool, you can add test cases and prepare test plans, and also, based on the test cases, you can directly create the Requirement Traceability Matrix (RTM).
In this post of softwaretestingo, we are trying to briefly discuss the requirement traceability matrix (RTM). If you are using RTM in your organization, then why don’t you share your inputs in the comment section so that it will help our QA friends?
To conclude, RTM is a complete document that tracks business requirements through the Requirement Definition, Analysis, Design, Development, and Test Strategy. The Developer and Programmer can never be wrong with the RTM, as the document tracks all the technical requirements, test cases, and business goals. Establishing traceability helps the team to reduce leakage and waste of resources.