A program that works for one sensible value might still fail at the edges of what it should accept, or crash on something silly. Good testers choose data on purpose: typical values, wrong values, and the values right at the limits.
Normal data is typical data that should be accepted. Abnormal (erroneous) data should be rejected: out of range or the wrong type. Extreme data is the largest or smallest acceptable value. Boundary data is the largest or smallest acceptable value and the corresponding smallest or largest rejected value, testing both sides of each limit. Each test has an expected result.
In the lab's test data mode, pick values for each category and run the validation routine. Check that every value is accepted or rejected exactly as you predicted.
| Type | Meaning | Age 11 to 18 (whole numbers) | Expected result |
|---|---|---|---|
| Normal | Typical data the program should accept | 14, 16 | Accepted |
| Abnormal | Data that should be rejected: out of range or wrong type | 25, -3, "fifteen" | Rejected |
| Extreme | The largest and smallest acceptable values | 11, 18 | Accepted |
| Boundary | The largest/smallest acceptable value and the corresponding smallest/largest rejected value | 11 and 10; 18 and 19 | 11, 18 accepted; 10, 19 rejected |
Extreme data is always accepted: it is the very edge of what is allowed. Boundary data comes in pairs, one accepted and one rejected, at each limit.
In the exam you are given a rule and asked to suggest test data of a stated type, with a reason. Read the limits carefully: is each end included or not?
Read "more than 10" carefully: 10 itself is rejected, so the smallest acceptable whole number is 11. The boundary pair is then 10 (rejected) and 11 (accepted).
Four quick checks. Each correct answer earns XP and records this skill on your profile.
What is extreme test data?
Which type of test data should be rejected?
A program accepts 1 to 50. Which pair is boundary data for the upper limit?
In the lab, the routine accepts 11 to 18. Which value is normal test data?
Testers write the expected result before running each test, then compare it with the actual result. Any difference shows an error to fix.
REPEAT
OUTPUT "Enter your age (11 to 18)"
INPUT Age
UNTIL Age >= 11 AND Age <= 18
OUTPUT "Age accepted"
| Test data | Type | Expected result |
|---|---|---|
| 14 | Normal | Accepted: "Age accepted" |
| 11 | Extreme (and boundary) | Accepted |
| 18 | Extreme (and boundary) | Accepted |
| 10 | Boundary | Rejected: asked to enter the age again |
| 19 | Boundary | Rejected: asked to enter the age again |
| 30 | Abnormal | Rejected: asked to enter the age again |
UNTIL Age >= 11 AND Age <= 18 is mistyped as UNTIL Age > 11 AND Age <= 18. Which test in the plan reveals the error?An expected result must be specific: "rejected, error message shown" or "accepted", not just "it works".
Unlocks once the four checks above are done. Worth more XP, written to IGCSE Paper 1 standard.
A field accepts whole numbers greater than 0 and less than 10. Which is extreme test data?
Why is boundary data used?
A program accepts a number of guests from 2 to 8. Which list contains only abnormal data?
Which value for a range of 18 to 65 is boundary data but NOT extreme data?
This skill is now recorded on your profile. Keep the chain going.