Start trefwoorden te typen om de site te doorzoeken. Druk enter om te verzenden.
Generative AI
Cloud
Testing
Artificial intelligence
Security
‘Coverage’ is a useful concept that helps testers with complex questions, such as:
Coverage has everything to do with the wish to find the most possible defects with the fewest possible test cases. Instead of simply testing ‘just any’ subset of options, we aim to compile a set of test cases that create the greatest possible change of finding the defects that are there.
We can never be certain that all defects have been found or even that 60% of all defects has been found. After all, we do not know how many defects there actually are. What we can demonstrate, is the coverage realised by the test. And this confers a certain level of confidence that the chance of any defects remaining in the tested system is small. In summary: the higher the coverage realised, the smaller the chance that any unknown defects remain in the system.
There are a lot of definitions relating to coverage. The definition below is a simple one, but it reflects the essence perfectly well:
In other words, coverage says something about how many of ‘all possibilities that can be tested’ are actually tested. This means that there are 2 phenomena that together determine the coverage:
The decision to ‘test more thoroughly’ concretely translates to a decision to achieve more extensive coverage. In principle, there are 3 options in this respect:
It should be clear by now that a statement like ‘I want to test with a 75% coverage ratio’ does not say much, for the following reasons:
This section will discuss these issues in greater detail and explain
To explain this, we will use the following example about a system to order books via the Internet. It describes only a fraction of what such a system could do in reality, but it will suffice for our purposes.
So what is best? Do we choose covering paths or covering decision points? Clearly doing both achieves the highest level of thoroughness. But say that this is not allowed (e.g. because it is too costly). Say that we have to choose, then what would be best? Or more concretely:Which coverage type is better: ‘test depth level 2’ or ‘multiple condition coverage’?
This question may seem simple, but it isn’t. One coverage type could only be called ‘better’ with any practical use if it would find at least all of the defects found by the other coverage type plus some additional defects. But the example above demonstrated that multiple condition coverage finds a specific defect that is not found with test depth level 2 (i.e. the extra discount for few but expensive books). But the reverse is true as well (i.e. the discount that is given incorrectly in case of cancellation). So the best answer is:We cannot unequivocally talk about ‘better’!The various coverage types find different defects.
That which we want to cover by tests is termed coverage type: the form in which test situations are deducible from the test basis. A coverage type focuses on achieving a specific coverage to detect specific types of defect.
Coverage types are found to be a difficult and time-consuming business. Some people would prefer not using any coverage types at all! It is true, some coverage types are difficult to apply and take a considerable amount of time. But who said testing was easy? Coverage types represent the only way to realise the agreed test strategy in a demonstrable way. If unsuitable coverage types are used or even none at all, it is impossible to demonstrate that the required test intensity is achieved. As a result, all of the choices that led to a suitable test strategy would be in vain, and it becomes very difficult to make a coherent statement as to whether test goals, risks, priorities or simply the desired test intensity have or have not been covered.
Coverage types may be divided into four basic coverage groups:
The table below gives a brief description of each coverage type per group. Where applicable, an indication is given how the depth of coverage can vary according to the coverage type.
For some coverage types, it is possible to variate the coverage thouroughness within the coverage type.
The table below gives several examples:
There exist many coverage types and test design techniques. For the sake of simplicity and practicality we will only highlight the most commonly used test design techniques and hence the application of the underlying coverage types.
To give you a practical overview we highlight the most commonly used coverage types and some test design techniques in which they can be applied.
We left out the coverage group “Appearance”. In the cases where that coverage group is applicable, the coverage type and thourougness depends too much on the specific interface and the result the tester wants to achieve.
Coverage groups:ProcessPathsRight paths / fault pathsState transitionConditionsDecision Table Test (DTT)Decision pointsModified Condition/Decision coverageSemantic TestElementary Comparison Test (ECT)DataEquivalence classesBoundary value analysisData Combination Test (DCoT)Orthogonal arrays and pairwise testingCRUDIntegrity rulesSyntactis Test (SYN)AppearanceAppearancePresentationStatistical usage: operational profiles and load profilesChecklist