Skip to content
PlayOwl

Coding · Grade 9

Testing, Debugging and Edge Cases

Learners design tests with equivalence partitions and boundary value analysis, build edge-case checklists for collections and text, and write test suites that catch hidden buggy versions of real functions. They debug as an investigation (reproduce, hypothesise, predict, fix, regression-test) and use assertions and automated tests to make programs check themselves, while keeping validation for user input.

  • 4 lessons
  • About 90 minutes
  • Check what you learned: 8 questions
  • Ways to answer: choose an answer, put code in order, trace code, match pairs, type a number and put in order
See plans Included with Family, Teacher and School plans. Open in PlayOwl

What learners will discover

  • Design test cases with equivalence partitions and boundary values, with expected outputs taken from the specification.
  • Identify edge cases for collections and text and use them to expose bugs.
  • Debug systematically by reproducing a failure, forming and testing hypotheses, fixing and adding regression tests.
  • Use assertions and automated tests to check a program's own guarantees, and distinguish them from input validation.

Lessons

  1. Partitions and boundaries 6 steps3 practiceabout 22 min
  2. Edge cases in data 5 steps3 practiceabout 20 min
  3. Debugging as an investigation 5 steps3 practiceabout 20 min
  4. Assertions and automated tests 5 steps3 practiceabout 20 min
  5. Check what you learned 8 questions at the end

Keep exploring

More 9th grade coding

Guide for grown-ups