Three Ways to Increase Test Coverage
Based on my experience, the majority of defects in any testing engagement are linked with the requirements phase. The root causes of most defects are due to poorly defined requirements and incomplete test coverage, and the cost of fixing an error is cheaper at the coding phase than during the testing phase.
In order to address this problem and ensure more complete test coverage, follow the following three approaches:
- Functional workflow documentation
- Four-dimensional test coverage
- Risk-based test methodology
Approach #1: Functional Workflow Documentation
Functional workflow documentation is a key activity in the overall scheme of actions. This approach starts with identification and approval of workflows by business users and is followed by analysis and understanding of each step of the workflow by business analysts. After understanding the workflow, the next step is updating the knowledge acquisition document (KAD) and clarification log. Prerequisites and transaction inputs should be clearly identified and documented.
The process flow can be broken down broadly into four phases of identification, knowledge transition, preparation and review, and approval by business users. Two deliverables from this approach would be the KAD and functional workflow document.
Approach #2: Four-Dimensional Test Coverage
Reviewing test coverage can be a difficult task if there is no proper planning in place. This approach focuses on four areas to ensure complete test coverage by validating the requirements against them, such as validation requirement, data, usage scenario, and compliance.
The diagram below shows the four dimensions and the various inputs across each that one needs to look for while checking for complete test coverage.
Approach #3: Risk-Based Test Methodology
The risk-based test methodology prioritizes the features and functions to be tested based on priority or importance and likelihood or impact of failure. In theory, because there are an infinite number of possible tests, any set of tests must be a subset of all possible tests. Test techniques such as boundary value analysis and state transition testing aim to find the areas most likely to be defective.
In this approach, all the business-critical functionalities would be identified based on the risk weightage and risk score as priority test cases for execution. Risk based on parameters such as business priority, usage volume, audit compliance, and failure history would be assigned weightage against each of the test cases, and risk score against each parameter will be mapped to the test cases.
A risk rating (or weighted risk average) based on the risk weightage and risk score then can be calculated, and test cases will be prioritized based on the risk rating. Execution starts with high-priority test cases and then subsequently the medium- and the low-priority ones.
Ensuring complete test coverage has a direct bearing on all three project pillars: cost, time, and quality. Implement the above three approaches to ensure more effective test coverage in a testing engagement.