Teaching article
A program test case names the starting state and expected result
Specify the input, starting state and expected result.
Saying reach the goal leaves out much of the test. Record the input, position, heading and predicted outcome, then explain which feature the chosen case is meant to check and what it leaves untested.
Choose a case that checks a particular feature or boundary. Several purposeful cases are more informative than repeating one familiar successful route.
Give each test a purpose
Record the setup. Predict the trace. Compare execution.
A test naming only the goal omits how the robot starts.
Passing one test does not prove every case works.
What does this test cover? Provide a test-case template.
Resources
- Human Robot Commands – Coding Without Screens Printable Game — Check the command conventions before using the sequence or debugging task.
Further reading
- CS Unplugged — Kidbots and algorithm activities
- Australian Curriculum Version 9 — Technologies overview
Read next
- An arrow route is an algorithm only when the commands are clear
- An if instruction needs a condition the reader can test
- Picture codes represent selected information
Explore Coding and computational thinking. Browse all teaching articles.
