Curriculum

Curriculum

Reproduce a Bug with One Input

Scenario

The program sometimes accepts bookings for full rooms.

Selected choicePick a choice below
Result—

Try it yourself

Choose the smallest report another learner can verify.

Reveal the explanation
  1. Booking is broken

    The other learner cannot reproduce a specific failure.

  2. Call canBook(0)

    Expected false. Actual true. This is enough to reproduce the failure.

Run the same input again. If the result depends on state, include the state in the reproduction.

Your turn

Write a one-case reproduction another learner could run from a terminal.

Common mistake Reporting only that the program is broken.

Check your work

The report includes the command or call, its input, the expected result, and the actual result.