Skip to main content
testing

When: you have a bug report and want the fix to be provable · Input: {{bug_report}} (what happens vs what should happen) · Output: a failing test that reproduces the bug, the minimal fix that turns it green, the test run, follow-ups noticed but not changed · keywords: bug fix, regression test, TDD, reproduce

0
Nov 1, 2026
v1
Import with the CLI:ple import ple:zeynepaslierhan/testing/d8d4cccd
11 lines
Fix this bug the test-first way: prove it, then fix it.

Bug report: {{bug_report}}

1. Locate the code responsible (search for the symbols and behavior named in the report). Do not edit anything yet.
2. Write ONE test that reproduces the bug at the smallest level that shows it: a unit test if possible, an integration test if not. Follow the project's existing test style.
3. Run it. It must FAIL, and for the reason in the report. If it passes or fails differently, your understanding is wrong: revise the test, do not touch the code.
4. Make the smallest change that turns the test green. Do not refactor, rename or fix neighbouring issues; list them at the end instead.
5. Run the whole test suite for the touched area and report any new failure.

Output: Reproduction (test + failing output) | Fix (diff) | Result (passing output) | Follow-ups (noticed, not changed).

Related prompts