CodeIEB
Theory Notes/๐Ÿ—„๏ธ Topic 4: Data & Information Management, Solution Development/10.4.13
10.4.13Grade 10

Testing Software for Robustness

How to methodically test a program so you can be confident it actually works, rather than just 'seems to work' on the one input you tried.

Selecting appropriate test data โ€” always test with three categories of data:

Data typePurposeExample (for an age field, valid range 0โ€“120)
StandardTypical, everyday valid values25
ExtremeValues right at the very edge of what's valid0 and 120
AbnormalInvalid values that should be rejected-5, 'twenty', 999
Trace table
A table used to manually track the value of each variable as a program executes step-by-step, used to test program logic and identify exactly where an error occurs.

Types of programming errors:

Error typeDescriptionExample
Syntax errorBreaks the rules of the programming language; the program won't even compile/runMissing a semicolon, misspelling a keyword
Runtime errorThe program compiles and starts running, but crashes during executionDividing by zero, accessing an array index that doesn't exist
Logical errorThe program runs without crashing, but produces the wrong result because the logic itself is flawedUsing + instead of - in a calculation

Example

Trace table for a loop that sums numbers 1 to 3: i | sum 1 | 1 2 | 3 3 | 6 After the loop ends (i > 3), sum = 6 โ€” matches the expected result, confirming the logic is correct.

๐Ÿ’ก Exam Tip

Logical errors are the hardest to catch because the program runs successfully โ€” always test against a manually calculated expected result, not just 'does it run without crashing'.