Task 7 Practical Guide

Test, Trace And Debug

Use evidence to show that the program has been checked.

Steps

  1. 1 Choose normal, boundary and invalid or unexpected test values.
  2. 2 Write the expected result before running the test.
  3. 3 Run the program and record the actual result.
  4. 4 Trace one loop or decision using a table.
  5. 5 Identify the error type if something fails.
  6. 6 Correct the issue or write a clear limitation if time runs out.

Examples

Normal

20 theory minutes and 25 practice minutes should produce total 45 and balanced feedback.

Boundary

30 and 60 should both count as balanced if the rule is 30 to 60 inclusive.

Logical error

`balancedCount <- 1` should be `balancedCount <- balancedCount + 1`.

Avoid

Testing only one value

Leaving the trace table blank

Calling a wrong result a run-time error when the program did not crash

Task 7 Syllabus Reminder

Integer, real, Boolean and character data types.
Meaningful variable naming conventions.
Source code and executable code.
Sequence, one-way selection, two-way selection, multi-way selection, test-first iteration, test-last iteration and fixed iteration.
Syntax, run-time and logical errors.
Data validation, test data and trace tables.
Flow charts and pseudocode used to model and test algorithm logic.
Internal and external documentation where relevant.