Constructing test data for validation checks
Values chosen to test each validation rule: empty for existence, text for type, and values just inside and just outside range limits, each with an expected result.
Understanding Constructing test data for validation checks in VCE Software Development U3O1
What it does: 100 is the highest value still inside the range 1 to 100, so the range check should accept it. A type check is tested with text where a number is expected. The rule should reject it, so the expected result is rejected. Boundary tests use values just outside and just inside each limit: -1 and 101 are rejected, while 0 and 100 are accepted. Values in the middle do not test the limits. An empty string has no content, so it is the test value used to check that an existence rule rejects missing input.
Common mistakes: Boundary test data for a range of 18 to 65 needs values just outside the limits (17 and 66) as well as on them. This list only has accepted values, so it never tests rejection. It should be [17, 18, 65, 66]. An existence check must accept a value only when it is not empty. Using == 0 reverses the rule, so the empty test value would be accepted. It should be len(name) > 0.
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
test dataFill in the Blanks
Spot the Error
Student with a class code? Join your class →