Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

step-03-test-strategy.md 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ---
  2. name: 'step-03-test-strategy'
  3. description: 'Map acceptance criteria to test levels and priorities'
  4. outputFile: '{test_artifacts}/atdd-checklist-{story_key}.md'
  5. nextStepFile: '{skill-root}/steps-c/step-04-generate-tests.md'
  6. ---
  7. # Step 3: Test Strategy
  8. ## STEP GOAL
  9. Translate acceptance criteria into a prioritized, level-appropriate test plan.
  10. ## MANDATORY EXECUTION RULES
  11. - 📖 Read the entire step file before acting
  12. - ✅ Speak in `{communication_language}`
  13. - 🚫 Avoid duplicate coverage across levels
  14. ---
  15. ## EXECUTION PROTOCOLS:
  16. - 🎯 Follow the MANDATORY SEQUENCE exactly
  17. - 💾 Record outputs before proceeding
  18. - 📖 Load the next step only when instructed
  19. ## CONTEXT BOUNDARIES:
  20. - Available context: config, loaded artifacts, and knowledge fragments
  21. - Focus: this step's goal only
  22. - Limits: do not execute future steps
  23. - Dependencies: prior steps' outputs (if any)
  24. ## MANDATORY SEQUENCE
  25. **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
  26. ## 1. Map Acceptance Criteria
  27. - Convert each acceptance criterion into test scenarios
  28. - Include negative and edge cases where risk is high
  29. ---
  30. ## 2. Select Test Levels
  31. Choose the best level per scenario based on `{detected_stack}`:
  32. **If {detected_stack} is `frontend` or `fullstack`:**
  33. - **E2E** for critical user journeys
  34. - **API** for business logic and service contracts
  35. - **Component** for UI behavior
  36. **If {detected_stack} is `backend` or `fullstack`:**
  37. - **Unit** for pure functions, business logic, and edge cases
  38. - **Integration** for service interactions, database queries, and middleware
  39. - **API/Contract** for endpoint validation, request/response schemas, and Pact contracts
  40. - **No E2E** for pure backend projects (no browser-based testing needed)
  41. ---
  42. ## 3. Prioritize Tests
  43. Assign P0–P3 priorities using risk and business impact.
  44. ---
  45. ## 4. Confirm Red Phase Requirements
  46. Ensure all tests are designed to **fail before implementation** (TDD red phase).
  47. ---
  48. ## 5. Save Progress
  49. **Save this step's accumulated work to `{outputFile}`.**
  50. - **If `{outputFile}` does not exist** (first save), create it with YAML frontmatter:
  51. ```yaml
  52. ---
  53. stepsCompleted: ['step-03-test-strategy']
  54. lastStep: 'step-03-test-strategy'
  55. lastSaved: '{date}'
  56. ---
  57. ```
  58. Then write this step's output below the frontmatter.
  59. - **If `{outputFile}` already exists**, update:
  60. - Add `'step-03-test-strategy'` to `stepsCompleted` array (only if not already present)
  61. - Set `lastStep: 'step-03-test-strategy'`
  62. - Set `lastSaved: '{date}'`
  63. - Append this step's output to the appropriate section.
  64. Load next step: `{nextStepFile}`
  65. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
  66. ### ✅ SUCCESS:
  67. - Step completed in full with required outputs
  68. ### ❌ SYSTEM FAILURE:
  69. - Skipped sequence steps or missing outputs
  70. **Master Rule:** Skipping steps is FORBIDDEN.