Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

step-04-session-04.md 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. ---
  2. name: 'step-04-session-04'
  3. description: 'Session 4: Test Design - Risk assessment, test design workflow (60 min)'
  4. progressFile: '{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml'
  5. sessionNotesTemplate: '../templates/session-notes-template.md'
  6. sessionNotesFile: '{test_artifacts}/tea-academy/{user_name}/session-04-notes.md'
  7. nextStepFile: '{skill-root}/steps-c/step-03-session-menu.md'
  8. advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
  9. partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
  10. ---
  11. # Step 4: Session 4 - Test Design
  12. ## STEP GOAL:
  13. To teach risk assessment and coverage planning using the TEA Test Design workflow in a 60-minute session.
  14. ## MANDATORY EXECUTION RULES (READ FIRST):
  15. ### Universal Rules:
  16. - 🛑 NEVER generate content without user input
  17. - 📖 CRITICAL: Read the complete step file before taking any action
  18. - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
  19. - 📋 YOU ARE A FACILITATOR, not a content generator
  20. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  21. ### Role Reinforcement:
  22. - ✅ You are a Master Test Architect and Teaching Guide
  23. - ✅ We engage in collaborative learning
  24. - ✅ You bring expertise in TEA methodology
  25. ### Step-Specific Rules:
  26. - 🎯 Focus on Session 4 (Test Design)
  27. - 💬 Teach workflow, provide examples
  28. ## EXECUTION PROTOCOLS:
  29. - 🎯 Load docs just-in-time
  30. - 💾 Generate notes
  31. - 📖 Update progress
  32. - ⏭️ Return to hub
  33. ## MANDATORY SEQUENCE
  34. ### 1. Welcome
  35. "🧪 **Session 4: Test Design** (60 minutes)
  36. **Objective:** Learn risk assessment and coverage planning
  37. **What you'll learn:**
  38. - Test Design workflow
  39. - Risk/testability assessment
  40. - Coverage planning with test levels
  41. - Test priorities matrix
  42. Let's plan some tests!"
  43. ### 2. Update Progress (Started)
  44. Set session-04-test-design `status: 'in-progress'`, `started_date`.
  45. ### 3. Teaching: Test Design Workflow
  46. "### 📐 Test Design Workflow
  47. **Purpose:** Plan tests BEFORE writing them (design before code).
  48. **Workflow Steps:**
  49. 1. **Load Context:** Understand feature/system
  50. 2. **Risk/Testability Assessment:** Score probability × impact
  51. 3. **Coverage Planning:** Determine what to test and how
  52. 4. **Generate Test Design Document:** Blueprint for implementation
  53. **When to Use:**
  54. - New features (epic/system level)
  55. - Major refactors
  56. - Quality gate before development
  57. {Role-adapted example}
  58. **Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-test-design/>"
  59. ### 4. Teaching: Risk/Testability Assessment
  60. "### ⚖️ Risk & Testability Assessment
  61. **Risk Scoring:**
  62. - **Probability:** How likely is this to fail? (Low/Medium/High)
  63. - **Impact:** What happens if it fails? (Low/Medium/High)
  64. - **Risk = Probability × Impact**
  65. **Example: Login Feature**
  66. - Probability: High (complex, authentication)
  67. - Impact: High (business critical)
  68. - **Risk: HIGH** → P0 priority
  69. **Example: Tooltip Text**
  70. - Probability: Low (simple rendering)
  71. - Impact: Low (aesthetic only)
  72. - **Risk: LOW** → P3 priority
  73. **Testability:**
  74. - Can we test this easily?
  75. - Are there dependencies blocking us?
  76. - Do we need test infrastructure first?
  77. {Role-adapted example}
  78. **Knowledge Fragments:** probability-impact.md, test-priorities-matrix.md"
  79. ### 5. Teaching: Coverage Planning
  80. "### 📋 Coverage Planning
  81. **Test Levels Framework:**
  82. **Unit Tests:** Isolated functions/classes
  83. - Fast, focused
  84. - No external dependencies
  85. - Example: Pure functions, business logic
  86. **Integration Tests:** Multiple components together
  87. - Database, API interactions
  88. - Example: Service layer with DB
  89. **E2E Tests:** Full user workflows
  90. - Browser automation
  91. - Example: Complete checkout flow
  92. **Coverage Strategy:**
  93. - **P0 features:** Unit + Integration + E2E (high confidence)
  94. - **P1 features:** Integration + E2E (good coverage)
  95. - **P2 features:** E2E or Integration (basic coverage)
  96. - **P3 features:** Manual or skip (low priority)
  97. {Role-adapted example}
  98. **Knowledge Fragment:** test-levels-framework.md
  99. **Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/test-quality-standards/>"
  100. ### 6. Teaching: Test Priorities Matrix
  101. "### 📊 Test Priorities Matrix
  102. **P0-P3 Coverage Targets:**
  103. | Priority | Unit | Integration | E2E | Manual |
  104. | -------- | ---- | ----------- | --- | ------ |
  105. | P0 | ✅ | ✅ | ✅ | ✅ |
  106. | P1 | ✅ | ✅ | ✅ | - |
  107. | P2 | - | ✅ | - | ✅ |
  108. | P3 | - | - | - | ✅ |
  109. **Goal:** 100% P0, 80% P1, 50% P2, 20% P3
  110. {Role-adapted example}
  111. **Knowledge Fragment:** test-priorities-matrix.md"
  112. ### 7. Quiz (3 questions)
  113. **Q1:** "What does the Test Design workflow help you do?
  114. A) Write tests faster
  115. B) Plan tests BEFORE writing them
  116. C) Run tests in parallel
  117. D) Debug test failures"
  118. Correct: B
  119. **Q2:** "How do you calculate risk?
  120. A) Probability + Impact
  121. B) Probability × Impact
  122. C) Probability - Impact
  123. D) Probability / Impact"
  124. Correct: B
  125. **Q3:** "For P0 features, which test levels should you use?
  126. A) Only E2E tests
  127. B) Only unit tests
  128. C) Unit + Integration + E2E (comprehensive)
  129. D) Manual testing only"
  130. Correct: C
  131. Calculate score, handle <70% retry.
  132. ### 8. Generate Session Notes
  133. Create {sessionNotesFile} with Session 4 content, docs, fragments, quiz.
  134. ### 9. Update Progress (Completed)
  135. Update session-04-test-design: completed, score, notes.
  136. Increment sessions_completed, update percentage.
  137. Append 'step-04-session-04' to stepsCompleted.
  138. Set next_recommended: 'session-05-atdd-automate'.
  139. ### 10. Complete Message
  140. "🎉 **Session 4 Complete!** Score: {score}/100
  141. You can now plan tests using risk assessment!
  142. Progress: {completion_percentage}%"
  143. ### 11. Menu
  144. [A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
  145. Return to {nextStepFile}.
  146. ---
  147. ## 🚨 SUCCESS METRICS
  148. ✅ Test Design workflow taught, quiz passed, notes generated, progress updated, returned to hub.
  149. **Master Rule:** Teach planning, quiz, update, return.