Reproduction Steps / 复现步骤
Clear reproduction steps are the most critical part of a bug report. Without them, developers cannot fix the bug.
清晰的复现步骤是 Bug 报告中最重要的部分。没有它们,开发人员就无法修复 Bug。Importance of Good Reproduction / 良好复现的重要性
Rules for Writing Reproduction Steps / 复现步骤编写规则
1. Be Precise / 精确
Use specific names, values, and paths. / 使用具体名称、数值和路径。
Good: Click the "Sign In" button at the top right
Bad: Click the button at the top
2. Be Complete / 完整
Start from a reproducible state (logged out, on homepage, etc.). / 从可复现的状态开始(已登出、在首页等)。
Good:
1. Log out of the app
2. Go to https://example.com/login
3. Enter email "[email protected]"
4. Enter password "Test123!"
5. Click "Sign In"
Bad:
1. Log in
2. Try to do something
3. Be Minimal / 精简
Include only the necessary steps to reproduce. / 只包含必要的复现步骤。
4. Include Test Data / 包含测试数据
Specify exact values used. / 说明使用的确切数值。
5. Specify Timing / 说明时机
If timing matters (e.g., click twice quickly, wait 10 seconds). / 如果时机很重要(如:快速点击两次、等待 10 秒)。
Understanding Bug Reproductions Bug / 复现的理解
Bug reproductions in bug reports help developers understand the exact scenario:
- Consistent / 稳定复现: Bug always happens — easiest to fix
- Intermittent / 间歇复现: Bug happens sometimes — harder to diagnose
- Environmental / 环境相关: Bug only on specific device/browser
Example: Good vs Bad Reproduction / 示例:好与差
Good Reproduction / 好的复现
Title: [Checkout] "Place Order" button is disabled when using promo code "WELCOME10"
Steps:
1. Go to https://example.com/products
2. Add "Wireless Mouse" (SKU: WM-001) to cart
3. Click cart icon → go to checkout
4. In "Promo Code" field, enter "WELCOME10"
5. Click "Apply"
6. Observe the "Place Order" button
Expected: "Place Order" button becomes enabled, total reflects discount
Actual: "Place Order" button remains disabled. Console shows error:
"Uncaught TypeError: Cannot read property 'apply' of undefined"
Poor Reproduction / 差的复现
Title: Checkout fails
Steps:
1. Try to buy something with a coupon
Doesn't work