Python Foundations · Lesson 12 of 12Testing and debugging
Normal, boundary and invalid data; trace and fix. Learn through short examples, practical tasks and targeted questions.
← All lessons
Testing and fixing programs
Testing checks whether a program behaves as intended for normal, boundary and invalid inputs. A trace table records variable values as the algorithm runs, making errors easier to isolate. Change one part at a time and rerun the same test.
Watch out: A program working for one example does not prove it is correct. Include boundary values and unexpected input in the test plan.
A free TutorSyntax programming lesson. About our teaching approach.
APPLY THE IDEA
Use this skill beyond the example
A useful test plan includes normal, boundary and invalid cases with expected results. Do not just rerun the same successful example: deliberately choose data that could reveal a defect.
Quick check: Why is testing only one normal value insufficient?
Check: It may not expose boundary conditions, unexpected input or errors in other branches.
Continue with related practice →