Tuesday, May 3, 2011

Traceability Matrix

A traceability matrix is a document, usually in the form of a table, that correlates any two baselined documents that require a many to many relationship to determine the completeness of the relationship, just like to map the relationship between Test Requirements and Test Cases. From  Traceability Matrix, we can check that which requirements are covered in which test cases and "particular test case covers which requirements".
In this matrix, the rows will have the requirements. For every document {HLD, LLD etc}, there will be a separate column. So, in every cell, we need to state, what section in HLD addresses a particular requirement. Ideally, if every requirement is addressed in every single document, all the individual cells must have valid section ids or names filled in. Then we know that every requirement is addressed. In case of any missing of requirement, we need to go back to the document and correct it, so that it addressed the requirement.
In a nutshell, requirements traceability is the process of ensuring that one or more test cases address each requirement.  
                                      
Example of a Traceability Matrix document:
 Req ID  Req Description  TC001  TC002  TC003
 R1.1  ……… Yes   Yes
 R1.2  ………. Yes    
 R2.1  …….   Yes  

Example of a Traceability Matrix document:
 Req ID  Req Description  TC001  TC002  TC003
 R1.1  ……… Yes   Yes
 R1.2  ………. Yes    
 R2.1  …….   Yes  

Above table shows –
Requirement R1.1 is covered in TC001 and TC003.
R1.2 is covered in TC001.
R2.1 is covered in TC002
Above table also provides the test coverage. From Traceability Matrix document, we can ensure that all the requirements are addressed in the test cases. 
Disadvantages of not using Traceability Matrix:
  1. Poor or unknown test coverage, more defects found in production.
  2. It will lead to miss some bugs in earlier test cycles which may arise in later test cycles. Then a lot of discussions arguments with other teams and managers before release.
  3. Difficult project planning and tracking, misunderstandings between different teams over project dependencies, delays, etc
Benefits of using Traceability Matrix: 
  1. Make obvious to the client that the software is being developed as per the requirements.
  2. To make sure that all requirements included in the test cases
  3. To make sure that developers are not creating features that no one has requested
  4. Easy to identify the missing functionalities.
  5. If there is a change request for a requirement, then we can easily find out which test cases need to update.
  6. The completed system may have “Extra” functionality that may have not been specified in the design specification, resulting in wastage of manpower, time and effort.

No comments: