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-06.md 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. ---
  2. name: 'step-04-session-06'
  3. description: 'Session 6: Quality & Trace - Test review, traceability, quality metrics (45 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-06-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 6 - Quality & Trace
  12. ## STEP GOAL:
  13. To teach test quality auditing and requirements traceability using Test Review and Trace workflows in a 45-minute session.
  14. ## MANDATORY EXECUTION RULES (READ FIRST):
  15. ### Universal Rules:
  16. - 🛑 NEVER generate _unsolicited_ content without user input (session flow content is allowed once session begins)
  17. - 📖 CRITICAL: Read complete step file before action
  18. - ✅ SPEAK OUTPUT In {communication_language}
  19. ### Role Reinforcement:
  20. - ✅ Master Test Architect and Teaching Guide
  21. - ✅ Collaborative learning
  22. ### Step-Specific Rules:
  23. - 🎯 Focus on Session 6 (Quality & Trace)
  24. - 💬 Teach quality metrics
  25. ## EXECUTION PROTOCOLS:
  26. - 🎯 Load docs just-in-time
  27. - 💾 Generate notes
  28. - 📖 Update progress
  29. - ⏭️ Return to hub
  30. ## MANDATORY SEQUENCE
  31. ### 1. Welcome
  32. "🧪 **Session 6: Quality & Trace** (45 minutes)
  33. **Objective:** Audit quality and ensure traceability
  34. **What you'll learn:**
  35. - Test Review workflow (quality scoring)
  36. - 5 dimensions of test quality
  37. - Trace workflow (requirements traceability)
  38. - Release gate decisions
  39. Let's ensure quality!"
  40. ### 2. Update Progress (Started)
  41. Set session-06-quality-trace `status: 'in-progress'`.
  42. ### 3. Teaching: Test Review Workflow
  43. "### 🔍 Test Review Workflow
  44. **Purpose:** Audit test quality with 0-100 scoring
  45. **5 Dimensions of Quality:**
  46. **1. Determinism (0-100)**
  47. - Tests pass/fail consistently
  48. - No flakiness, no randomness
  49. - Proper async handling
  50. **2. Isolation (0-100)**
  51. - Tests run independently
  52. - No shared state
  53. - Parallelizable
  54. **3. Assertions (0-100)**
  55. - Correct checks for expected behavior
  56. - Meaningful assertions (not just presence)
  57. - Fails for the right reasons
  58. **4. Structure (0-100)**
  59. - Readable test code
  60. - Clear organization and naming
  61. - Minimal duplication
  62. **5. Performance (0-100)**
  63. - Test execution speed
  64. - Resource usage
  65. - Parallel efficiency
  66. **Overall Score = Average of 5 dimensions**
  67. {Role-adapted example}
  68. **Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-test-review/>"
  69. ### 4. Teaching: Trace Workflow
  70. "### 🔗 Trace Workflow: Requirements Traceability
  71. **Purpose:** Map tests to requirements, make release gate decision
  72. **Trace Workflow:**
  73. 1. **Load Context:** Understand acceptance criteria
  74. 2. **Discover Tests:** Find all test files
  75. 3. **Map Criteria:** Link tests to requirements
  76. 4. **Analyze Gaps:** What's not tested?
  77. 5. **Gate Decision:** GREEN (ship) or RED (block)
  78. **Release Gate Logic:**
  79. - **GREEN:** All P0/P1 criteria have tests, gaps are P2/P3
  80. - **YELLOW:** Some P1 gaps, assess risk
  81. - **RED:** P0 gaps exist, DO NOT SHIP
  82. {Role-adapted example}
  83. **Documentation:** <https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/how-to/workflows/run-trace/>"
  84. ### 5. Teaching: Quality Metrics
  85. "### 📊 Quality Metrics That Matter
  86. **Track:**
  87. - **P0/P1 Coverage %** (not total line coverage)
  88. - **Flakiness Rate** (flaky tests / total tests)
  89. - **Test Execution Time** (feedback loop speed)
  90. - **Determinism Score** (from Test Review)
  91. **Don't Track (Vanity Metrics):**
  92. - Total line coverage % (tells you nothing about risk)
  93. - Number of tests (quantity ≠ quality)
  94. - Test file count (irrelevant)
  95. {Role-adapted example}
  96. **Goal:** High P0/P1 coverage, zero flakiness, fast execution."
  97. ### 6. Quiz (3 questions)
  98. **Q1:** "What are the 5 dimensions in Test Review workflow?
  99. A) Speed, cost, coverage, bugs, time
  100. B) Determinism, Isolation, Assertions, Structure, Performance
  101. C) Unit, integration, E2E, manual, exploratory
  102. D) P0, P1, P2, P3, P4"
  103. Correct: B
  104. **Q2:** "When should the Trace workflow gate decision be RED (block release)?
  105. A) Any test failures exist
  106. B) P0 gaps exist (critical requirements not tested)
  107. C) Code coverage is below 80%
  108. D) Tests are slow"
  109. Correct: B
  110. **Q3:** "Which metric matters most for quality?
  111. A) Total line coverage %
  112. B) Number of tests written
  113. C) P0/P1 coverage %
  114. D) Test file count"
  115. Correct: C
  116. Calculate score, handle <70% retry.
  117. ### 7. Generate Session Notes
  118. Create {sessionNotesFile} with Session 6 content, Test Review + Trace workflows, quality metrics.
  119. ### 8. Update Progress (Completed)
  120. Update session-06-quality-trace: completed, score, notes.
  121. Increment sessions_completed, update percentage.
  122. Append 'step-04-session-06' to stepsCompleted.
  123. Set next_recommended: 'session-07-advanced'.
  124. ### 9. Complete Message
  125. "🎉 **Session 6 Complete!** Score: {score}/100
  126. You can now audit quality and ensure traceability!
  127. Progress: {completion_percentage}%"
  128. ### 10. Menu
  129. [A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
  130. Return to {nextStepFile}.
  131. ---
  132. ## 🚨 SUCCESS METRICS
  133. ✅ Test Review and Trace taught, quality dimensions explained, quiz passed, notes generated, returned to hub.