Iterative testing while coding
Testing each small part of the code as it is written, fixing any errors, then retesting before moving on. This finds errors early and repeats until that part works.
Understanding Iterative testing while coding in IGCSE Computer Science Paper 2
What it does: Running the loop as soon as it is written shows any error straight away, while the problem is still small and easy to find. Iterative testing means testing each small part as it is written, fixing errors and retesting. After fixing an error you must retest to check that the fix worked and nothing else broke. You repeat the test and fix cycle until that part works, then move on. Both are needed. Iterative testing happens in the coding stage, and the testing stage checks the finished program. Errors found early are quicker and cheaper to fix than errors hidden in a large amount of untested code.
Common mistakes: Iterative testing means test, fix, then retest. Moving on straight after fixing skips the retest, so the fix is never checked. It should read: // Fix errors, then retest. Testing this part gives 3 instead of the expected 6, which shows an error. Total is overwritten each time instead of being added to. The fix is Total ← Total + Count, then retest.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 1–16) and word search (Modules 1–26).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
Iterative testingFill in the Blanks
Spot the Error
Student with a class code? Join your class →