Traceability Matrix from Software Testing perspective

Traceability Matrix is used in entire software development life cycle phases:

1. Risk Analysis phase

2. Requirements Analysis and Specification phase
3. Design Analysis and Specification phase
4. Source Code Analysis, Unit Testing & Integration Testing phase
5. Validation – System Testing, Functional Testing phase

In this topic we will discuss:

- What is Traceability Matrix from Software Testing perspective?

- Types of Traceability Matrix - Disadvantages of not using Traceability Matrix
- Benefits of using Traceability Matrix in testing
- Step by step process of creating an effective Traceability Matrix from requirements. Sample formats of Traceability Matrix basic version to advanced version.

In Simple words - A requirements traceability matrix is a document that traces and maps user requirements [requirement Ids from requirement specification document] with the test case ids. Purpose is to make sure that all the requirements are covered in test cases so that while testing no functionality can be missed.

This document is prepared to make the clients satisfy that the coverage done is complete as end to end, this document consists of Requirement/Base line doc Ref No., Test case/Condition, and Defects/Bug id. Using this document the person can track the Requirement based on the Defect id.

Note – We can make it a “Test case Coverage checklist” document by adding few more columns. We will discuss in later posts..

Types of Traceability Matrix:

  1. Forward Traceability – Mapping of Requirements to Test cases
  2. Backward Traceability – Mapping of Test Cases to Requirements
  3. Bi-Directional Traceability - A Good Traceability matrix is the References from test cases to basis documentation and vice versa.

Prashant Vadher - Types of Traceability Matrix

Why Bi-Directional Traceability is required?

Bi-Directional Traceability contains both Forward & Backward Traceability. Through Backward Traceability Matrix, we can see that test cases are mapped with which requirements.

This will help us in identifying if there are test cases that do not trace to any coverage item- in which case the test case is not required and should be removed (or maybe a specification like a requirement or two should be added!). This “backward” Traceability is also very helpful if you want to identify that a particular test case is covering how many requirements?
Through Forward Traceability- we can check that requirements are covered in which test cases? Whether is the requirements are covered in the test cases or not?
Forward Traceability Matrix ensures - We are building the Right Product. Backward Traceability Matrix ensures - We the Building the Product Right.
Traceability matrix is the answer of the following questions of any Software Project:

  • How is it feasible to ensure, for each phase of the SDLC, that I have correctly accounted for all the customer’s needs?
  • How can I certify that the final software product meets the customer’s needs? Now we can only make sure requirements are captured in the test cases by traceability matrix.

Disadvantages of not using Traceability Matrix [some possible (seen) impact]:

No traceability or Incomplete Traceability Results into:

  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.

Steps to create Traceability Matrix:

1. Make use of excel to create Traceability Matrix:

2. Define following columns:

Base Specification/Requirement ID (If any)
Requirement ID

Requirement description

TC 001

TC 002

TC 003..

So on.

3. Identify all the testable requirements in granular level from requirement document. Typical requirements you need to capture are as follows:
Used cases (all the flows are captured)
Error Messages
Business rules
Functional rules
So on…
4. Identity all the test scenarios and test flows.
5. Map Requirement IDs to the test cases. Assume (as per below table), Test case “TC 001” is your one flow/scenario. Now in this scenario, Requirements SR-1.1 and SR-1.2 are covered. So mark “x” for these requirements.
Now from below table you can conclude:

  • Requirement SR-1.1 is covered in TC 001
  • Requirement SR-1.2 is covered in TC 001
  • Requirement SR-1.5 is covered in TC 001, TC 003 [Now it is easy to identify, which test cases need to be updated if there is any change request].
  • TC 001 Covers SR-1.1, SR, 1.2 [we can easily identify that test cases covers which requirements].
  • TC 002 covers SR-1.3.. So on..

Prashant Vadher - Basic Traceability Matrix Format

This is a very basic traceability matrix format. You can add more following columns and make it more effective:
ID, Assoc ID, Technical Assumption(s) and/or Customer Need(s), Functional Requirement, Status, Architectural/Design Document, Technical Specification, System Component(s), Software Module(s), Test Case Number, Tested In, Implemented In, Verification, Additional Comments...

Thanks & Regards ,

Prashant Vadher | QA Engineer


jacky said...

This matrix is quite useful in testing cycle.I like it.It could be useful for me also.
Testing Services Companies

Anonymous said...

[b][url=] Order Zithromax [/url][/b]

Anonymous said...

Brilliant web site, I hadn't come across previously in my searches!
Carry on the excellent work!

Anonymous said...

superb nw i am clarified wats d diff between forward and backward tracabilities frm sunil varma

Anonymous said...

I have always had trouble in setting up a verified phone number with my Craigslist account. I have finally found a service that solves this problem.
They sell [url=]Craigslist Phone Verified Accounts[/url] at the cheapest prices I have ever seen. My experience with them has been exceptional and I highly recommend their service!

Lalisa said...

Its a very nice to see about Enterprise Application Testing. Thanks for sharing .

Software testing training  said...

Amazing description. I always find trouble in making traceability matrix. After reading your post I got my error and points where I am lacking. Now I can make it well.

Anonymous said...

This is a very interesting site. The content is very informative and I am so glad that I dropped by. Thanks!

Anonymous said...

Thank you for the work you have done into this post, it helps clear up some questions I had.

Anonymous said...

Hey - I am certainly delighted to find this. great job!

Anonymous said...

Really useful

ToolsJournal said...

Good testing website Prashant

Post a Comment

Design by Prashant Vadher