test-scenarios

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Test Scenarios

测试场景

Create comprehensive test scenarios from user stories with test objectives, starting conditions, user roles, step-by-step test actions, and expected outcomes.
Use when: Writing QA test cases, creating test plans, defining acceptance test scenarios, or validating user story implementations.
Arguments:
  • $PRODUCT
    : The product or system name
  • $USER_STORY
    : The user story to test (title and acceptance criteria)
  • $CONTEXT
    : Additional testing context or constraints
从用户故事生成包含测试目标、前置条件、用户角色、分步测试操作和预期结果的完整测试场景。
适用场景: 编写QA测试用例、制定测试计划、定义验收测试场景或验证用户故事实现效果时。
参数:
  • $PRODUCT
    :产品或系统名称
  • $USER_STORY
    :待测试的用户故事(标题及验收标准)
  • $CONTEXT
    :额外的测试背景或约束条件

Step-by-Step Process

分步流程

  1. Review the user story and acceptance criteria
  2. Define test objectives - What specific behavior to validate
  3. Establish starting conditions - System state, data setup, configurations
  4. Identify user roles - Who performs the test actions
  5. Create test steps - Break down interactions step-by-step
  6. Define expected outcomes - Observable results after each step
  7. Consider edge cases - Invalid inputs, boundary conditions
  8. Output detailed test scenarios - Ready for QA execution
  1. 审阅用户故事及验收标准
  2. 定义测试目标 - 需验证的具体行为
  3. 确定前置条件 - 系统状态、数据准备、配置情况
  4. 明确用户角色 - 执行测试操作的人员
  5. 编写测试步骤 - 将交互过程逐步拆解
  6. 定义预期结果 - 每一步操作后的可观测结果
  7. 考虑边缘情况 - 无效输入、边界条件
  8. 输出详细测试场景 - 可供QA团队直接执行

Scenario Template

场景模板

Test Scenario: [Clear scenario name]
Test Objective: [What this test validates]
Starting Conditions:
  • [System state required]
  • [Data or configuration needed]
  • [User setup or permissions]
User Role: [Who performs the test]
Test Steps:
  1. [First action and its expected result]
  2. [Second action and observable outcome]
  3. [Third action and system behavior]
  4. [Completion action and final state]
Expected Outcomes:
  • [Observable result 1]
  • [Observable result 2]
  • [Observable result 3]
测试场景: [清晰的场景名称]
测试目标: [本次测试需验证的内容]
前置条件:
  • [所需的系统状态]
  • [所需的数据或配置]
  • [用户设置或权限要求]
用户角色: [执行测试的人员角色]
测试步骤:
  1. [第一步操作及其预期结果]
  2. [第二步操作及可观测结果]
  3. [第三步操作及系统行为]
  4. [完成操作及最终状态]
预期结果:
  • [可观测结果1]
  • [可观测结果2]
  • [可观测结果3]

Example Test Scenario

测试场景示例

Test Scenario: View Recently Viewed Products on Product Page
Test Objective: Verify that the 'Recently viewed' section displays correctly and excludes the current product.
Starting Conditions:
  • User is logged in or has browser history enabled
  • User has viewed at least 2 products in the current session
  • User is now on a product page different from previously viewed items
User Role: Online Shopper
Test Steps:
  1. Navigate to any product page → Section should appear at bottom with previously viewed items
  2. Scroll to bottom of page → "Recently viewed" section is visible with product cards
  3. Verify product thumbnails → Images, titles, and prices are displayed correctly
  4. Check current product → Current product is NOT in the recently viewed list
  5. Click on a product card → User navigates to the corresponding product page
Expected Outcomes:
  • Recently viewed section appears only after viewing at least 1 prior product
  • Section displays 4-8 product cards with complete information
  • Current product is excluded from the list
  • Each card shows "Viewed X minutes/hours ago" timestamp
  • Clicking cards navigates to correct product pages
  • Performance: Section loads within 2 seconds
测试场景: 在商品页面查看最近浏览的商品
测试目标: 验证“最近浏览”板块是否正确显示,且不包含当前商品。
前置条件:
  • 用户已登录或浏览器历史记录功能已启用
  • 用户在当前会话中已浏览至少2个商品
  • 用户当前处于与之前浏览商品不同的商品页面
用户角色: 在线购物者
测试步骤:
  1. 导航至任意商品页面 → 页面底部应显示包含之前浏览商品的板块
  2. 滚动至页面底部 → “最近浏览”板块可见,且展示商品卡片
  3. 验证商品缩略图 → 图片、标题和价格均正确显示
  4. 检查当前商品 → 当前商品未出现在最近浏览列表中
  5. 点击某张商品卡片 → 用户跳转至对应商品页面
预期结果:
  • 仅在浏览至少1个商品后,最近浏览板块才会显示
  • 板块展示4-8张包含完整信息的商品卡片
  • 当前商品被排除在列表之外
  • 每张卡片显示“X分钟/小时前浏览”的时间戳
  • 点击卡片可跳转至正确的商品页面
  • 性能要求:板块加载时间不超过2秒

Output Deliverables

输出交付物

  • Comprehensive test scenarios for each acceptance criterion
  • Clear test objectives aligned with user story intent
  • Detailed step-by-step test actions
  • Observable expected outcomes after each step
  • Edge case and error scenario coverage
  • Ready for QA team execution and documentation
  • 针对每条验收标准的完整测试场景
  • 与用户故事意图一致的明确测试目标
  • 详细的分步测试操作
  • 每一步操作后的可观测预期结果
  • 覆盖边缘情况和错误场景
  • 可供QA团队直接执行和归档的文档