← VCE Software Development U4O1

Recording corrections in a testing table

The fix recorded in a testing table for a failed test, followed by the retest result that shows whether the fix worked (pass or fail).

Understanding Recording corrections in a testing table in VCE Software Development U4O1

What it does: It names the specific change made to the code, so the fix can be checked and repeated. A retest uses the same test data. A Fail means the fix did not work and a new correction is needed. A testing table records the fix made for each failed test, so the change can be traced later. The retest result records pass or fail after the corrective action. Expected output is the planned result and does not change. A good entry is specific. It names what was changed and where, rather than saying 'fixed the bug'. A corrective action is only needed for a failed test. A passed test needs no fix.

Common mistakes: A single = assigns a value, so it cannot be used to test whether the result was a fail. The check that decides if a corrective action is recorded needs the comparison operator ==. The string for the corrective action is missing its closing quote, so Python raises a SyntaxError. It should be fix = "Added int()".

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 125–171) and word search (Modules 115–171).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A test case fails. What should the testing table record next?
Nothing, until all tests have been runThe corrective action taken to fix the problem
Matches
Test 4 | Result: Fail | Correction: (blank) | Retest: Pass
↓
The test failed but no corrective action is recorded, so the retest Pass cannot be traced to any fix
Applying
Meanings
Term
corrective action
Meaning
The fix recorded in a testing table for a failed test, followed by the retest result that shows whether the fix worked (pass or fail).
Practice
Test 3: enter age -1
Testing
Gaps
if actual expected:
Check Answer
Spots
1result = "fail"
2if result = "fail":

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Hermit Crab' badge — Definition Collector, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A test case fails. What should the testing table record next?
A. The corrective action taken to fix the problem ✓
B. Nothing, until all tests have been run
A testing table records the fix made for each failed test, so the change can be traced later.
2. Which column shows whether a fix actually worked?
A. Expected output
B. Retest result ✓
The retest result records pass or fail after the corrective action. Expected output is the planned result and does not change.
3. Test 4 failed because age 0 was accepted. Which is a good corrective action entry?
A. Fixed the bug
B. Changed the check to age >= 1 in validate_age() ✓
A good entry is specific. It names what was changed and where, rather than saying 'fixed the bug'.
4. After applying a fix, the test is run again and gives the expected output. What is the retest result?
A. Pass ✓
B. Fail
If the retest output matches the expected output, the fix worked and the retest result is a pass.
5. The retest of a fixed test still gives the wrong output. What should happen?
A. Record Fail, then make and record another corrective action ✓
B. Change the expected output to match the actual output
A failed retest means the fix did not work. Record it and try another fix. Changing the expected output would hide the fault.

Match the Pairs

Test 3 | Expected: 50 | Actual: 5 | Result: Fail → A failed test row: the actual output does not match the expected output, so a correction is needed
Correction: changed < to <= in the loop condition | Retest: Pass → A corrective action and retest result: the fix made, then proof from running the test again that it now works
The corrective action column records exactly what was changed in the code to fix a failed test → Correction: added int() around input() to convert age to a number
After a fix, the same test is run again and the retest result is recorded as Pass or Fail → Retest result: Fail - still returns 5, so try a new fix
Test 4 | Result: Fail | Correction: (blank) | Retest: Pass → The test failed but no corrective action is recorded, so the retest Pass cannot be traced to any fix
Test 2 | Result: Fail | Correction: fixed the code | Retest: (blank) → The correction is vague and there is no retest result, so nobody knows if the fix worked

Key Term

corrective action
The fix recorded in a testing table for a failed test, followed by the retest result that shows whether the fix worked (pass or fail).

Fill in the Blanks

1. if actual != expected: row["result"] = "Fail"
Hint: Type the comparison operator that detects a failed test, where the actual output differs from the expected output.
2. row = tests[3] row["fix"] = "Added int() conversion"
Hint: Type the three-letter column name that stores the corrective action for the failed test.
3. actual = add(2, 3) row["retest"] = actual == expected
Hint: Type the comparison operator that checks whether the output from the retest equals the expected output.
4. if row["result"] == "Fail": row["fix"] = "Fixed loop range"
Hint: Type the keyword that decides whether a fix needs to be recorded for this test.
5. for row in tests: if row["retest"] == "Fail": print(row["id"], "still fails")
Hint: Type the key that holds the result of running the test again after the fix was made.

Spot the Error

Question 1
A result = "fail"
B if result = "fail":
C fix = "Changed < to <="
D print(fix)
Line B — A single = assigns a value, so it cannot be used to test whether the result was a fail. The check that decides if a corrective action is recorded needs the comparison operator ==.
Question 2
A outcome = "fail"
B if outcome == "fail":
C fix = "Added int()
D retest = "pass"
Line C — The string for the corrective action is missing its closing quote, so Python raises a SyntaxError. It should be fix = "Added int()".
Question 3
A expected = 10
B actual = 4 + 6
C if actual != expected:
D retest = "pass"
Line C — The retest should be marked pass only when the actual output matches the expected output. != marks it as pass when they differ. It should be ==.
Question 4
A row = {"test": 5}
B row["fix"] == "Added a check"
C row["retest"] = "pass"
D print(row)
Line B — == compares values and does not store anything. The fix is never added to the record, and the comparison raises a KeyError. Use = to assign the corrective action to the "fix" field.
Question 5
A table = []
B row = ["T5", "Fix", "pass"]
C table.add(row)
D print(table[0])
Line C — Lists have no add() method, so this raises an AttributeError. A row is added to the testing table list with table.append(row).

Student with a class code? Join your class →