Example 1 — Choose test ages for a ticket rule
Show the steps and the answer
Mark where one price hands over to the next: between 2 and 3, and between 12 and 13.
Mistakes collect where one rule ends and the next begins, so those are the values to test.
Test each boundary and its neighbour: 2 free, 3 child, 12 child, 13 adult.
A pair on each side of a line shows whether the code used < or <= correctly.
Add the extremes: 0 free (a baby is a valid customer) and 110 adult.
The smallest real age and a very large one show the ranges have no gaps at their ends.
Add one impossible input: -1 should be rejected with an error message.
It is not a real age, so refusing it is correct, which is different from handling a valid edge.
Answer: Test 0 (free), 2 (free), 3 (child), 12 (child), 13 (adult), 110 (adult) and -1 (error).
Takeaway: For a rule with ranges, test each boundary and the value just past it, plus the extremes and one impossible input.