Skip to content
SPM Tuition
Lesson · Computer Science

Reproducible test logs for your own changes

Your notes say 'tested it, works', and nobody, including you next week, can repeat what you did.

A reproducible test log records each test so precisely that another person can repeat it and get the same result. It also records what you changed after a failure, so the log tells the story of your own improvements.

This lesson is part of web development without assessed-project substitution. It goes further than a general work log, which records decisions and help, by fixing the exact inputs and results of each test.

What must a reproducible step contain?

Four things: the starting state, the exact input, the ordered actions and the expected result. Missing any one makes the test open to guessing.

Element Weak Reproducible
Starting state (none) “Fresh page load, all boxes empty”
Input “a bad mark” “Mark box: 105”
Actions “try it” “Click Check once”
Expected “error” “Message: Mark must be 0 to 100”

Worked example: one fault, before and after

A fictional mark checker accepts a mark from 0 to 100 and shows “Pass” from 50.

ID Steps Input Expected Actual Result
T1 Load page, type in Mark box, click Check 72 Pass Pass Pass
T2 Load page, type in Mark box, click Check 50 Pass Fail shown Fail
T3 Load page, type in Mark box, click Check 105 Error message Pass Fail

T2 fails because the condition says mark > 50 where it needs mark >= 50. T3 fails because nothing checks the upper limit.

After the student edits the code, the log continues.

ID Change made Re-test actual Result
T2 Changed > to >= Pass Pass
T3 Added a check for marks above 100 Error message Pass
T1 (re-run, no change) Pass Pass

T1 is re-run even though it already passed, to show the changes broke nothing. The table lets a reader see the full sequence: fail, change, pass.

The mistake: “tested, works”

A typical weak log reads: “Tested the checker with some marks. Works.” It gives no inputs, no steps, no expected results and no record of a failure.

Nobody can repeat it, and you cannot learn from it either. A week later you will not remember which marks you tried.

How do I check that my log is reproducible?

Hand your log to a classmate who has not seen the page and ask them to run T2. If they cannot produce the same result from your words alone, the step needs more detail.

Also check that the log contains only your own tests and changes. The change column should say what you did, in your words, so it reflects your own reasoning.

Check yourself

Turn this into a reproducible step: “Checked the name box with something weird.”

Answer

One version:

  • T7. Start: page loaded with all boxes empty.
  • Steps: type 12345 in the Name box, click Submit once.
  • Expected: message ‘Name must contain letters only’.
  • Actual and Result: filled in after you run the test.

It fixes the starting state, exact input, actions and expected result. Nothing is left to guess.

What to study next

Put everything together with the cluster practice set. If you want a teacher to review your test log with you, see online one-to-one Computer Science tuition.

Common questions

What makes a test log reproducible?

Someone else can follow your steps exactly and get the same result. That needs the starting state, the exact input, the actions in order, and the expected result. Vague steps such as 'try a bad value' are not repeatable.

What columns should a test log have?

An ID, the steps, the input, the expected result, the actual result, pass or fail, and the change you made if it failed. Add the date. That is enough for a short project.

Should I keep failed tests in the log?

Yes. A failed test followed by a change and a passing re-test shows that real testing led to real improvement. Deleting failures makes the log look dishonest and hides useful learning.

How is this different from a general work log?

A work log records what you did and decided over time. A test log records specific tests with exact inputs and results, so that any test can be repeated and compared.

Reading your test log aloud in one-to-one Computer Science lessons quickly shows which steps are missing, and the log and every change in it stay your own.

  • Online one-to-one lessons for your child with an experienced teacher.
  • Your first class is a one-hour trial, from RM50. The fee is agreed before you book.
  • Happy with the teacher? Continue with lessons of about 1.5 hours. If not, ask for another teacher.