TL;DR
Word coverage is the most misused word in software testing. Let’s explained what coverage is by giving definitions and real case examples. The post is aligned with the Black Box Software Testing Foundations course (BBST) designed by Rebecca Fiedler, Cem Kaner, and James Bach.
The Definition
The extent (proportion) of testing of specific attributes or pieces of software under test.
Examples
The picture above shows blanket coverage of a dog. It is a 98% blanket coverage.
In software, the most used attribute is statement coverage. The problem with this coverage is that complete code coverage does not mean that we have full test coverage. The statement is just one of many possible software attributes that could be measured using coverage.
For coverage metrics, we use a percentage. But the percentage of what? In the picture above, I stated that we have 98% blanket coverage. Here is more detail on that number:
Blanket does not cover the paws of the front legs. My estimation is that this is 2% of the total dog body:
100% - 2% = 98% blanket coverage.
Note that my assumption is an estimation. We should use some advanced dog measurements to determine the paws percentage.
In testing software, the percentage is the number of the measured attribute we tested divided with the total number of that attribute.
Testing Coverage
As a software tester, you must not forget about testing coverage:
Extent (proportion) of testing of a given type that has been completed, compared to the population of possible tests of this type.