Test Coverage Matrix

Devy Azkia
3 min readFeb 22, 2024

--

Test Coverage Matrix is a method to measure the amount of testing performed by a set of tests. It also helps to ensure all the possible conditions are tested and we do not miss any. This method is rarely used in designing test cases since the effort is too much because before we write the list of cases, we need to make the matrix for that. Also, some testers/QA experts don’t use it. “I think the expert has their own imaginary matrix 😆”

The TCM can also help distribute tasks within the team. because there are two different tasks: the first person makes the matrix with the test scenario, and the second person creates each test case result from the matrix.

Test Case vs Test Scenario

Before jumping to the TCM (Test Coverage Matrix), we must know the differences between the Test Scenario and Test Cases.

A Test Case is a set of actions executed to verify a particular feature or functionality of your software application. A Test Case contains test steps, test data, precondition, and postcondition developed for a specific test scenario to verify any requirement. The test case includes specific variables or conditions, using which a testing engineer can compare expected and actual results to determine whether a software product is functioning as per the requirements of the customer.

A Test Scenario is defined as any functionality that can be tested. It is a collective set of test cases which helps the testing team to determine the positive and negative characteristics of the project. Test Scenario gives a high-level idea of what we need to test.

— source: https://www.guru99.com/test-case-vs-test-scenario.html

I made a simple example for the Test Scenario and Test Cases for a dummy website https://www.saucedemo.com/:

  1. Test Scenario
    - Check the functionality of the Login Process
  2. Test Case
    For checking the functionality of login process, at least the test cases should contains:
    - Check login using Valid Email and Password
    - Check login using Invalid Email and Password
    - Check login using Valid Email and Invalid Password
    - Check login using Invalid Email and Valid Password
    - Check login using Blank Email and Password
    - … (etc I think a lot scenarios for this)

Design The TCM

A simple way to design the TCM (Test Coverage Matrix) is by writing the positive scenario for a feature. For example, feature Login, the flow for the Login feature we have:

  1. Input Username (E1: Input incorrect username)
  2. Input password (E2: Input incorrect password)
  3. Click button login
  4. Home page
Design TCM for login

It looks straightforward and simple. But, TCM is beneficial for complex scenarios/features, like payment and creating a digital signature using face ID and ID card; something like these has a lot of scenarios and cases.
After we have the Cases, we can transfer the cases into the test case with a complete description like this:

Test Case Example

So, TCM will significantly help design test cases, measure the number of test cases, and increase the test coverage with very detailed coverage. The point plus will make it easier to distribute tasks for working together.

Thanks :)

--

--