Exam-style question
Try this first
A program accepts a whole-number quantity from 1 to 20 inclusive. Design a suitable set of test data covering normal, boundary and erroneous data. For each value, identify its type and explain why it has been selected.
Model answer
What a good answer should say
- A suitable set could be: 10 as normal data, because it is a typical valid quantity; 1 and 20 as boundary data, because they are the lower and upper limits of the valid range; 0 and 21 as erroneous data, because they are outside the permitted range.
- Other justified examples would also be acceptable.
Explanation
Why this works
The test data should cover all three required categories. Normal data checks typical valid input, boundary data checks values at the edges of the permitted range, and erroneous data checks invalid values outside that range.
Selecting both boundaries and invalid values on either side gives useful coverage of the specified input range.
Common mistake
No common mistake is linked to this question yet.
