Skip to content

Blog

How to Write Steps to Reproduce a Bug (with Examples)

Write steps to reproduce that developers can follow the first time: good and bad examples, a bug report template, and tips for web and Mac apps.

By Steppr · · 7 min read

How to Write Steps to Reproduce a Bug (with Examples)

"Can't reproduce" is the most common way a bug report dies. Usually the bug is real. The report just left out the one detail that triggers it: the account type, the order of two clicks, the browser, the setting someone changed last week.

Steps to reproduce are the part of a bug report that fixes this. They are a numbered list of actions that take someone from a known starting point to the bug, every time. This guide shows how to write them, with good and bad examples and a template you can copy.

What "steps to reproduce" means

Steps to reproduce (often shortened to STR or "repro steps") describe exactly what to do to make a bug happen. They sit alongside two other short sections:

Together these three tell a developer where to look and how to know when it's fixed. The steps are the hardest to write well, because the person reporting the bug already knows what they did and fills in the gaps without noticing.

A quick example: bad vs good

Here's the same bug reported twice.

Bad:

Export is broken. When I try to export a report it just spins forever.

Good:

Environment: Web app, Safari 18 on macOS 15. Account role: Viewer.

Steps to reproduce:

  1. Sign in as a user with the Viewer role.
  2. Go to Reports › Monthly revenue.
  3. Set the date range to Last 12 months.
  4. Click Export › CSV.

Expected result: A CSV file downloads.

Actual result: The spinner on the Export button never stops. No file downloads. The browser console shows 403 Forbidden for /api/reports/export.

Frequency: Every time (5 of 5 attempts). Works with the Editor role.

The second report shows the cause before anyone opens the code: Viewers get a permission error on export. The first report would need a round of questions before anyone could start.

How to write steps to reproduce

1. Reproduce it yourself first

Before writing anything, make the bug happen again on purpose. If you can't, note what you were doing when it happened and say it's intermittent. Don't guess at steps you didn't confirm.

2. Find the shortest path

Your first reproduction probably includes detours. Try again and remove steps until the bug stops appearing. The shortest sequence that still triggers it is the one to report. Fewer steps means fewer places for the reader to go wrong, and it often points at the cause.

3. Start from a known state

Step 1 should be somewhere anyone can get to: "Sign in as a new user", "Open a blank document", "Clear the cart". If the bug needs specific data, say how to create it, or attach it.

Good starting points:

4. Write one action per step

Each step is a single action, starting with a verb, using the exact labels on screen:

Instead ofWrite
Go into settings and turn off notifications1. Click Settings. 2. Click Notifications. 3. Turn off Email alerts.
Enter some dataType 12.50 in the Amount field.
Click the buttonClick Submit (bottom right of the form).

Exact values matter. "Enter a long name" doesn't reproduce a bug that only happens past 255 characters.

5. Include the environment

Write down what the bug ran on. For most bugs that's:

You don't need all of these every time. Include the ones that could plausibly matter, and note any you tested that didn't change the result ("also happens in Chrome").

6. State expected and actual results

Keep them concrete and separate. "It doesn't work" isn't an actual result. "The page reloads and the form is empty" is.

7. Attach evidence

Blur or remove customer data, tokens and passwords before attaching anything.

8. Say how often it happens

"Every time", "about 1 in 3 attempts", or "happened once, couldn't reproduce". This tells the developer whether to look for a logic error or a race condition.

Steps to reproduce template

Copy this into your issue tracker:

Title: [Where] [what goes wrong] [under which condition]
e.g. Reports: CSV export never finishes for Viewer role

Environment:
- App version:
- OS:
- Browser (if web):
- Account / role:

Steps to reproduce:
1.
2.
3.

Expected result:

Actual result:

Frequency: Every time / Intermittent (x of y) / Once

Attachments: screenshots, recording, console log

If your team uses GitHub, you can save this as an issue template in .github/ISSUE_TEMPLATE/ so every report starts from it.

Native Mac apps: what's different

Bugs in desktop apps are often harder to reproduce than web bugs, because more of the state lives on the reporter's machine. Add:

Common mistakes

Capture the steps as you reproduce the bug

The slowest part of a good report is the busywork: reproducing the bug, taking a screenshot at each step, then uploading and ordering them in the issue. If you're on a Mac, Steppr records the steps while you reproduce the bug once. Every click and keystroke becomes a numbered step with a screenshot, named after the real button or field. You can blur anything sensitive, then copy the guide and paste it, screenshots included, straight into a GitHub issue or Jira ticket. It works in any Mac app, not only the browser, and runs entirely on your Mac.

You'll still want to add the environment, expected and actual results yourself. Those come from you, not from the recording.

Frequently asked questions

What's the difference between steps to reproduce and a test case?

Steps to reproduce describe how to trigger one specific bug. A test case describes how to check that a feature works, with a pass or fail result. Once a bug is fixed, its steps to reproduce often become a regression test case.

What if I can't reproduce the bug?

Report it anyway, but say so. Describe what you were doing, the time it happened, and attach anything you have: screenshots, logs, the error message. Mark it as intermittent.

Should steps to reproduce include screenshots?

For anything visual, yes. One screenshot of the key step and one of the result is usually enough for short reports. For long or unfamiliar flows, a screenshot per step saves a lot of back-and-forth.

For more on turning recordings into written steps, see how to turn a screen recording into a step-by-step guide. If you need a Mac tool that records steps like Windows Steps Recorder did, see Steps Recorder for Mac.

Make your first guide in a minute.

Steppr is in public beta. Try every feature free for 14 days, then buy a lifetime license for $9.99. No subscription, no account.

Download for Mac