Test cases: input, expected output, actual output
A chosen input paired with the output you expect. Run the algorithm, record the actual output, then compare: if actual matches expected it passes, otherwise it fails.
Understanding Test cases: input, expected output, actual output in VCE Software Development U3O1
What it does: The expected column is filled in by reasoning about the problem first, so it is an independent check on what the algorithm actually does. These four columns record each test case: what you put in, what you predicted, what really happened, and the pass or fail judgement. A test case pairs an input with the EXPECTED output. The actual output is only recorded after you run the algorithm. Doubling 7 gives 7 x 2 = 14. 49 is 7 squared, which is a different calculation.
Common mistakes: Assignment goes from the value to the variable. The chosen test input should be stored with input <- 5, not 5 <- input. The expected output must be worked out before running the algorithm (here input + 3). Using the algorithm to produce it means the test can never find an error.
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 caseFill in the Blanks
Spot the Error
Student with a class code? Join your class →