Judging whether a set of test cases is enough
Test cases are enough when they use normal, boundary and invalid data and run every branch and loop. Missing any leaves the program only partly validated, and passing tests never prove no bugs.
Understanding Judging whether a set of test cases is enough in ACARA Digital Technologies Years 9–10
What it does: Both tests are 50 or more, so only the Pass branch runs. The else branch is never tested, so the coverage is incomplete. One passing test shows the code works for that data only. Empty lists and other cases are untested, so bugs could remain. Enough tests need normal, boundary (0, 100) and invalid data (like -1 or 101). Counting tests is not the same as covering the types. Missing any one data type leaves a gap. Without invalid data, you do not know if the program rejects bad input. This list ticks every box on the data checklist, so it is much closer to being enough to validate an age check.
Common mistakes: The list is called tests, not test. Using test causes a NameError, so no test data is looped over. It should be for t in tests:. An if statement must end with a colon. Without it Python gives a SyntaxError, so neither branch can be tested. It should be if grade >= 50:.
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 591–622) and word search (Modules 536–622).
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 coverageFill in the Blanks
Spot the Error
Student with a class code? Join your class →