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-02-select-framework.md 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ---
  2. name: 'step-02-select-framework'
  3. description: 'Select Playwright or Cypress and justify choice'
  4. nextStepFile: '{skill-root}/steps-c/step-03-scaffold-framework.md'
  5. outputFile: '{test_artifacts}/framework-setup-progress.md'
  6. ---
  7. # Step 2: Framework Selection
  8. ## STEP GOAL
  9. Choose the most appropriate framework and document the rationale.
  10. ## MANDATORY EXECUTION RULES
  11. - 📖 Read the entire step file before acting
  12. - ✅ Speak in `{communication_language}`
  13. ---
  14. ## EXECUTION PROTOCOLS:
  15. - 🎯 Follow the MANDATORY SEQUENCE exactly
  16. - 💾 Record outputs before proceeding
  17. - 📖 Load the next step only when instructed
  18. ## CONTEXT BOUNDARIES:
  19. - Available context: config, loaded artifacts, and knowledge fragments
  20. - Focus: this step's goal only
  21. - Limits: do not execute future steps
  22. - Dependencies: prior steps' outputs (if any)
  23. ## MANDATORY SEQUENCE
  24. **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
  25. ## 1. Selection Logic
  26. Use `{detected_stack}` from Step 1 to guide framework selection.
  27. **If {detected_stack} is `frontend` or `fullstack` (browser-based testing):**
  28. Default to **Playwright** unless strong reasons suggest Cypress.
  29. **Playwright recommended when:**
  30. - Large or complex repo
  31. - Multi-browser support needed
  32. - Heavy API + UI integration
  33. - CI speed/parallelism is important
  34. **Cypress recommended when:**
  35. - Small team prioritizes DX
  36. - Component testing focus
  37. - Simpler setup needed
  38. **If {detected_stack} is `backend` (no browser-based testing):**
  39. Select the framework matching the project language:
  40. - **Python**: pytest (default), unittest
  41. - **Java/Kotlin**: JUnit 5 (default), TestNG
  42. - **Go**: Go test (built-in)
  43. - **C#/.NET**: xUnit (default), NUnit, MSTest
  44. - **Ruby**: RSpec (default), Minitest
  45. - **Rust**: cargo test (built-in)
  46. **If {detected_stack} is `fullstack`:**
  47. Select both a browser-based framework (Playwright/Cypress) AND the appropriate backend framework for the detected language.
  48. Respect `config.test_framework` if explicitly set (not `"auto"`).
  49. ---
  50. ## 2. Announce Decision
  51. State the selected framework and reasoning.
  52. ---
  53. ### 3. Save Progress
  54. **Save this step's accumulated work to `{outputFile}`.**
  55. - **If `{outputFile}` does not exist** (first save), create it with YAML frontmatter:
  56. ```yaml
  57. ---
  58. stepsCompleted: ['step-02-select-framework']
  59. lastStep: 'step-02-select-framework'
  60. lastSaved: '{date}'
  61. ---
  62. ```
  63. Then write this step's output below the frontmatter.
  64. - **If `{outputFile}` already exists**, update:
  65. - Add `'step-02-select-framework'` to `stepsCompleted` array (only if not already present)
  66. - Set `lastStep: 'step-02-select-framework'`
  67. - Set `lastSaved: '{date}'`
  68. - Append this step's output to the appropriate section of the document.
  69. Load next step: `{nextStepFile}`
  70. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS:
  71. ### ✅ SUCCESS:
  72. - Step completed in full with required outputs
  73. ### ❌ SYSTEM FAILURE:
  74. - Skipped sequence steps or missing outputs
  75. **Master Rule:** Skipping steps is FORBIDDEN.