Plain Reckoner
English
← All fix guides

Tests

Check whether an AI-written test catches the bug

Separate the expected behavior from the code being checked.

Editorial guide · Reviewed 2026-11-11

Step 01

Write the expected result

Use the requirement or an independently checked example. Do not copy the implementation’s output into the assertion.

Step 02

Check the broken version

Run the test against the known defect. Inspect the failure reason: a missing import is not evidence that the assertion detects the bug.

Step 03

Review the patch

Check that the production behavior changed and the expected result did not move just to accommodate it.

Step 04

Run the corrected version

Record the exact command and final result, then check relevant boundary cases.

Step 05

Keep the evidence

Save the regression case and explain the behavior it protects. A green suite is evidence only for the cases it actually checks.

Editorial checklist informed by an external practitioner experiment. We have not reproduced that experiment; results depend on your requirement, model and repository.
Birgitta Böckeler’s exploratory TDD evaluation ↗