Blog

How to write perfect reproduction steps for any bug

Learn how to write clear and detailed reproduction steps for any bug report to help engineers quickly identify and resolve issues.

Jordan Burnett
By Jordan Burnett

If you've ever been on the receiving end of a vague bug report, you know how frustrating it can be to track down an issue with little to no guidance.

Clear, concise reproduction steps are the cornerstone of a great bug report. They save time, minimize confusion, and help engineers quickly identify and fix the issue.

In this article, we'll break down how to write perfect reproduction steps for any bug, making sure your bug reports are actionable and easy to follow.

Why reproduction steps matter

Reproduction steps are the instructions that guide someone through the exact actions that lead to the bug. Without them, engineers are left guessing, which can lead to delays, confusion, and missed issues. The clearer and more specific your steps are, the faster the bug can be reproduced - and fixed.

1. Start from a clean slate

Before diving into the details of the bug, make sure the starting point is clear. This could be something as simple as "Open the app" or "Navigate to the homepage," but it sets the baseline for where the testing should begin.

Pro tips:

  • Reset the environment. If the bug occurs under specific conditions (e.g., when the user is logged out or after clearing the cache), make sure to include that.

  • State any preconditions. For example, "Ensure the user is logged in" or "Make sure the cart is empty before proceeding."

2. Break the process into clear, actionable steps

When writing reproduction steps, break down the process into simple, bite-sized actions. Each step should be a clear, actionable instruction - think of it as a checklist that anyone can follow. Avoid combining multiple actions in a single step.

Example:

Instead of writing, "Go to the homepage, log in, and add an item to the cart," break it down:

  1. Open www.example.com in Chrome browser.

  2. Click on the "Login" button at the top-right corner.

  3. Enter valid credentials and log in.

  4. Search for "Product A" and click "Add to Cart."

This breakdown ensures each action is explicit, leaving no room for confusion.

3. Be specific about inputs and interactions

The more precise you are about what inputs you used and how you interacted with the system, the easier it will be to reproduce the bug. Include details like the exact text you entered, the button you clicked, or the specific filter you applied.

Pro tips:

  • If the bug happens with certain input values, mention the exact input: "Enter ‘$0.00' in the price field."

  • If the bug occurs after interacting with a specific element, describe the interaction: "Click the ‘Submit' button in the bottom-right corner."

4. Describe the expected vs. actual outcome

For every step in the reproduction process, describe both the expected outcome and the actual outcome. This contrast clarifies exactly where things are going wrong.

Example:

Expected Outcome: After clicking "Add to Cart," the item is added, and the cart updates to show one item.
Actual Outcome: After clicking "Add to Cart," the page freezes, and no item is added to the cart.

5. Make it repeatable

Some bugs are intermittent, while others happen consistently. If the issue is intermittent, mention how often it occurs (e.g., "happens 1 out of 3 times"). If the bug happens consistently, clearly state that too.

Pro tip:

  • Test the bug yourself several times before submitting the report to confirm consistency.

  • If the bug happens inconsistently, provide as much context as possible about when it occurs.

6. Include any relevant environment details

Sometimes bugs occur only in specific environments (e.g., certain browsers, devices, or operating systems). Include this context in your reproduction steps to ensure engineers can replicate the issue under the right conditions.

Example:

  • Browser: Chrome v92

  • OS: macOS Ventura 13.1

  • Device: MacBook Pro M1

7. Test the steps before submitting

Before finalizing your bug report, walk through the reproduction steps yourself to make sure they work as expected. This prevents wasting time on incorrect or incomplete instructions.

Pro tip:

  • Double-check each step for accuracy.

  • Have a teammate follow the steps to ensure someone else can reproduce the issue.

Perfect reproduction steps lead to faster fixes

Writing perfect reproduction steps doesn't take much extra effort, but it can save engineers, and your team, a lot of time.

In summary, follow these simple steps and your engineers will thank you later!

  • Start from a clean slate.

  • Break down the process into clear, actionable steps.

  • Be specific about inputs and interactions.

  • Describe the expected vs. actual outcome.

  • Make the bug repeatable.

  • Include environment details.

  • Test the steps yourself.

And don't forget to check out capture.dev if you're interested in automating your bug reports.