$npx -y skills add phuryn/pm-skills --skill test-scenariosCreate comprehensive test scenarios from user stories with test objectives, starting conditions, user roles, step-by-step actions, and expected outcomes. Use when writing QA test cases, creating test plans, defining acceptance tests, or preparing for feature validation.
| 1 | # Test Scenarios |
| 2 | |
| 3 | Create comprehensive test scenarios from user stories with test objectives, starting conditions, user roles, step-by-step test actions, and expected outcomes. |
| 4 | |
| 5 | **Use when:** Writing QA test cases, creating test plans, defining acceptance test scenarios, or validating user story implementations. |
| 6 | |
| 7 | **Arguments:** |
| 8 | - `$PRODUCT`: The product or system name |
| 9 | - `$USER_STORY`: The user story to test (title and acceptance criteria) |
| 10 | - `$CONTEXT`: Additional testing context or constraints |
| 11 | |
| 12 | ## Step-by-Step Process |
| 13 | |
| 14 | 1. **Review the user story** and acceptance criteria |
| 15 | 2. **Define test objectives** - What specific behavior to validate |
| 16 | 3. **Establish starting conditions** - System state, data setup, configurations |
| 17 | 4. **Identify user roles** - Who performs the test actions |
| 18 | 5. **Create test steps** - Break down interactions step-by-step |
| 19 | 6. **Define expected outcomes** - Observable results after each step |
| 20 | 7. **Consider edge cases** - Invalid inputs, boundary conditions |
| 21 | 8. **Output detailed test scenarios** - Ready for QA execution |
| 22 | |
| 23 | ## Scenario Template |
| 24 | |
| 25 | **Test Scenario:** [Clear scenario name] |
| 26 | |
| 27 | **Test Objective:** [What this test validates] |
| 28 | |
| 29 | **Starting Conditions:** |
| 30 | - [System state required] |
| 31 | - [Data or configuration needed] |
| 32 | - [User setup or permissions] |
| 33 | |
| 34 | **User Role:** [Who performs the test] |
| 35 | |
| 36 | **Test Steps:** |
| 37 | 1. [First action and its expected result] |
| 38 | 2. [Second action and observable outcome] |
| 39 | 3. [Third action and system behavior] |
| 40 | 4. [Completion action and final state] |
| 41 | |
| 42 | **Expected Outcomes:** |
| 43 | - [Observable result 1] |
| 44 | - [Observable result 2] |
| 45 | - [Observable result 3] |
| 46 | |
| 47 | ## Example Test Scenario |
| 48 | |
| 49 | **Test Scenario:** View Recently Viewed Products on Product Page |
| 50 | |
| 51 | **Test Objective:** Verify that the 'Recently viewed' section displays correctly and excludes the current product. |
| 52 | |
| 53 | **Starting Conditions:** |
| 54 | - User is logged in or has browser history enabled |
| 55 | - User has viewed at least 2 products in the current session |
| 56 | - User is now on a product page different from previously viewed items |
| 57 | |
| 58 | **User Role:** Online Shopper |
| 59 | |
| 60 | **Test Steps:** |
| 61 | 1. Navigate to any product page → Section should appear at bottom with previously viewed items |
| 62 | 2. Scroll to bottom of page → "Recently viewed" section is visible with product cards |
| 63 | 3. Verify product thumbnails → Images, titles, and prices are displayed correctly |
| 64 | 4. Check current product → Current product is NOT in the recently viewed list |
| 65 | 5. Click on a product card → User navigates to the corresponding product page |
| 66 | |
| 67 | **Expected Outcomes:** |
| 68 | - Recently viewed section appears only after viewing at least 1 prior product |
| 69 | - Section displays 4-8 product cards with complete information |
| 70 | - Current product is excluded from the list |
| 71 | - Each card shows "Viewed X minutes/hours ago" timestamp |
| 72 | - Clicking cards navigates to correct product pages |
| 73 | - Performance: Section loads within 2 seconds |
| 74 | |
| 75 | ## Output Deliverables |
| 76 | |
| 77 | - Comprehensive test scenarios for each acceptance criterion |
| 78 | - Clear test objectives aligned with user story intent |
| 79 | - Detailed step-by-step test actions |
| 80 | - Observable expected outcomes after each step |
| 81 | - Edge case and error scenario coverage |
| 82 | - Ready for QA team execution and documentation |