Choosing a range of test data
A good test set uses normal data (typical values), boundary data (values at the edges of a range) and invalid data (values that should be rejected), so every path in an algorithm is checked.
Understanding Choosing a range of test data in VCE Software Development U3O1
What it does: 16 is an ordinary, expected value for a school student, so it checks the usual path through the algorithm works. This selection has three branches, so you need at least three test cases, one that triggers each branch. Normal data is a typical value inside the allowed range. 65 is a sensible score. -5 is outside the range, so it is invalid data. 50 sits right on the edge of the pass condition, so it tests whether the comparison operator is correct. A negative score is impossible for a test mark, so it checks that the algorithm rejects bad input instead of processing it.
Common mistakes: The boundary value 50 would fall through to Fail, because > excludes 50. A mark of exactly 50 should pass, so the line should be: else if mark >= 50 then. Boundary tests 13 and 18 are both accepted, so 15 lies inside the valid range and is normal data. Its expected result should be accepted, not rejected.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 168–177) and word search (Modules 168–193).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
normal, boundary and invalid dataFill in the Blanks
Spot the Error
Student with a class code? Join your class →