Suitable Test Data (Cambridge (CIE) IGCSE Computer Science)
Revision Note
Written by: Robert Hampton
Reviewed by: James Woodhouse
Suitable Test Data
What is suitable test data?
Suitable test data is specially chosen to test the functionality of a program or design
Developers or test-users would pick a selection of test data from the following categories
Normal
Abnormal
Extreme
Boundary
The results would be compared to the expected results to check if the algorithm/program works as intended
Each category is explained within the context of a simple Python program below, comments have been added to help explain the processes
Python |
---|
# Ask for user's name # Ask for user's age # Check if age is between 12 and 18 |
Normal data
Normal test data is data that should be accepted in the program
An example would be a user entering their age as 16 into the age field of the program
Abnormal data
Abnormal test data is data that is the wrong data type
An example would be a user entering their age as "F" into the age field of the program
Extreme data
Extreme test data is the maximum and minimum values of normal data that are accepted by the system
An example would be a user entering their age as 18 or 12 into the age field of the program
Boundary data
Boundary test data is similar to extreme data except that the values on either side of the maximum and minimum values are tested
The largest and smallest acceptable value is tested as well as the largest and smallest unacceptable value
An example would be a user entering their age as 11 or 19 into the age field of the program
Selecting suitable test data
Type of Test | Input | Expected Output |
---|---|---|
Normal | 14 | Accepted |
Normal | 16 | Accepted |
Extreme | 12 | Accepted |
Extreme | 18 | Accepted |
Abnormal | H | Rejected |
Abnormal | @ | Rejected |
Boundary | 11 | Rejected |
Boundary | 19 | Rejected |
Worked Example
A programmer has written an algorithm to check that prices are less than $10.00
These values are used as test data: 10.00 9.99 ten
State why each value was chosen as test data.
[3]
Answers
10.00 is boundary or abnormal data and should be rejected as it is out of range [1]
9.99 is boundary, extreme and normal data and should be accepted as it is within the normal range [1]
Ten is abnormal data and should be rejected as it is the wrong value type [1]
Last updated:
You've read 0 of your 10 free revision notes
Unlock more, it's free!
Did this page help you?