Boundary Data vs Erroneous Data in Test Cases
Learn how boundary data differs from erroneous data in GCSE Computer Science test cases, with age-input examples and the exam mistake to avoid.
Boundary data tests the limits of an allowed range. Erroneous data is the wrong kind of input for the field. The key question is whether you are testing where the valid range ends or whether the program handles an input it cannot use as intended.
Boundary data
Suppose a program accepts a whole-number age from 111 to 100100100, inclusive. The values 111 and 100100100 are valid boundary values: they sit exactly at the limits. It is also useful to test 000 and 101101101, because they sit just outside those limits and should be rejected. Together, these cases check that the program treats each end of the range correctly.
A number such as 505050 is normal data, not boundary data, because it is comfortably inside the allowed range. A number such as 150150150 is invalid because it is outside the range, but it is not close to a boundary. When choosing boundary test cases, use values at or immediately next to the limits.
Erroneous data
For the same age field, banana is erroneous data: the program expects a whole number but receives text that cannot be used as an age. A test case using banana checks that the program rejects or handles the wrong kind of input without producing an incorrect result.
Common exam mistake: Do not label every rejected input as erroneous data. In this example, 000 is still a number, so it is a useful just-outside-the-boundary test. banana tests a different problem: the input is not a usable number at all. In a test table, give the input and expected outcome, such as β000: rejected as below the minimumβ or βbanana: rejected as not a whole number.β