Test data Cambridge IGCSE Computer Science revision
Not started
Learn it
In plain words
A program that works for one sensible input has not been tested. Testing means trying to break it: with ordinary values, with silly values, and above all with values right on the edge of what is allowed.
5 things to know
- Normal data is typical data that the program should accept.
- Abnormal data is data that the program should reject: the wrong type, or a value outside the limits.
- Extreme data is the largest and the smallest value that should be accepted.
- Boundary data is the largest or smallest acceptable value together with the nearest value that should be rejected.
- Each test should state the data, the type of test data, and the result expected.
Worked example
A program accepts whole-number marks from 0 to 100. Suggest test data of each type.
- Normal: 57. It should be accepted.
- Abnormal: 150, or the word "ten". Each should be rejected.
- Extreme: 0 and 100. Both should be accepted.
- Boundary: 100 and 101 at the top (accepted, then rejected), and 0 and −1 at the bottom.
Tips and tricks
- Extreme data is still accepted. It sits on the limit, inside it. Boundary data is a pair: one each side of the limit.
- Give actual values that suit the question, and say whether each should be accepted or rejected.
It lands in your notebook with its questions as flashcards.
Test data: 5 questions and answers
These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.
What is normal test data?
It checks that the program works in ordinary use.
A program accepts numbers from 1 to 50. Which is abnormal data?
It is outside the range and should be rejected.
A program accepts numbers from 1 to 50. Which is extreme data?
It is the largest value that should be accepted.
A program accepts numbers from 1 to 50. Which pair is boundary data?
The last value accepted and the first value rejected.
Why is a program tested with abnormal data?
A good program copes with wrong input.
Quiz
5 questions
Tap an answer and you’ll see straight away whether it’s right, and why.
Worksheet
2 questions, 5 marks. Write your answers on paper, then check them.
Test data
Cambridge IGCSE Computer Science 0478 · 5 marks · papermunch.org
Name ______________________________ Date ______________
A program accepts ages from 11 to 18. Give one example each of normal, abnormal and extreme test data.[3]
Show answerHide answer
Normal: 14. Abnormal: 25 (or "abc"). Extreme: 11 (or 18).
The same program is tested with boundary data at its upper limit. State the two values used and the expected result of each.[2]
Show answerHide answer
18, which should be accepted, and 19, which should be rejected.
Answers: Test data
- 1. Normal: 14. Abnormal: 25 (or "abc"). Extreme: 11 (or 18).
- 2. 18, which should be accepted, and 19, which should be rejected.



