Skip to content
PlayOwl

Coding · Grade 4

Test Edge Cases and Debug

Fourth graders hunt for edge cases (zero, empty input, boundaries, capitals and other unusual inputs), write test plans with expected results and reasons, use their tests to catch hidden buggy versions of a real function, and debug with a reproduce-trace-fix-retest routine.

  • 4 lessons
  • About 85 minutes
  • Edge cases and debugging check: 8 questions
  • Ways to answer: fill in the blanks, choose an answer, trace code, highlight a text, match pairs and type a number
See plans Included with Family, Teacher and School plans. Open in PlayOwl

What learners will discover

  • Identify edge cases for a program: empty or zero inputs, boundaries, smallest and largest values, unusual characters.
  • Write a test plan with inputs, expected results worked out by hand, and a reason for each test.
  • Use test cases to catch hidden buggy versions of a function.
  • Debug systematically: reproduce, trace, find the cause, fix and re-run every test.

Lessons

  1. What are edge cases? 4 steps2 practiceabout 15 min
  2. Write a test plan 5 steps3 practiceabout 15 min
  3. Catch the hidden bugs 4 steps2 practiceabout 17 min
  4. Debug systematically 5 steps3 practiceabout 16 min
  5. Edge cases and debugging check 8 questions at the end

Keep exploring

Games to practice with

More 4th grade coding

Guide for grown-ups