name: ‘step-04-session-02’ description: ‘Session 2: Core Concepts - Risk-based testing, DoD, testing philosophy (45 min)’
progressFile: ‘{test_artifacts}/teaching-progress/{user_name}-tea-progress.yaml’ sessionNotesTemplate: ‘../templates/session-notes-template.md’ sessionNotesFile: ‘{test_artifacts}/tea-academy/{user_name}/session-02-notes.md’ nextStepFile: ‘{skill-root}/steps-c/step-03-session-menu.md’ advancedElicitationTask: ‘{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml’
To teach testing fundamentals including risk-based testing, TEA quality standards (Definition of Done), and testing as engineering philosophy in a 45-minute session.
{communication_language}CRITICAL: Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
Display:
“🧪 Session 2: Core Concepts (45 minutes)
Objective: Understand WHY behind TEA principles
What you’ll learn:
Let’s dive into the fundamentals!”
Load {progressFile} and update session-02-concepts:
status: 'in-progress'started_date: {current_date}Save the updated progress file.
Present this content:
”### 🏗️ Testing as Engineering
Core Philosophy: Testing is not an afterthought - it’s engineering.
What this means:
{If role == QA:} For QA Engineers: You’re not just finding bugs - you’re engineering test systems that scale. Design before write, maintain like production code.
{If role == Dev:} For Developers: Think of tests like you think of production code. Design patterns, refactoring, DRY principles - they all apply to tests.
{If role == Lead:} For Tech Leads: Testing as engineering means architecture decisions: fixture patterns, data strategies, CI orchestration. Not just “write more tests.”
{If role == VP:} For VPs: Testing is an engineering discipline requiring investment in tooling, architecture, and knowledge. Not a checklist item.
Key Principle: If you wouldn’t accept sloppy production code, don’t accept sloppy test code.
Documentation: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/testing-as-engineering/“
Present this content:
”### ⚖️ Risk-Based Testing: The P0-P3 Matrix
Problem: You can’t test everything. How do you prioritize?
Solution: Risk = Probability × Impact
The P0-P3 Matrix:
P0 - Critical (Must Test)
P1 - High (Should Test)
P2 - Medium (Nice to Test)
P3 - Low (Optional)
{If role == QA:} For QA Engineers: Use P0-P3 to defend test coverage decisions. “We have 100% P0 coverage, 80% P1” is better than “we have 50% coverage overall.”
{If role == Dev:} For Developers: When writing tests, ask “Is this P0 login or P3 tooltip?” Focus your time accordingly.
{If role == Lead:} For Tech Leads: P0-P3 helps allocate test automation budget. Mandate P0/P1 automation, P2/P3 is cost-benefit analysis.
{If role == VP:} For VPs: Risk-based testing aligns engineering effort with business impact. Metrics that matter: P0 coverage, not lines of code.
Documentation: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/risk-based-testing/
Knowledge Fragment: probability-impact.md defines scoring criteria”
Present this content:
”### ✅ TEA Definition of Done: Quality Standards
The Problem: “The tests pass” isn’t enough. What about quality?
TEA Definition of Done ensures:
1. No Flaky Tests
2. No Hard Waits/Sleeps
waitFor conditions, not sleep(5000)3. Stateless & Parallelizable
4. No Order Dependency
it/describe/context block works in isolation.only execution for debugging5. Self-Cleaning Tests
6. Tests Live Near Source Code
component.tsx → component.spec.tsx in same folder7. Low Maintenance
{If role == QA:} For QA Engineers: These standards prevent the “test maintenance nightmare.” Upfront investment in quality = long-term stability.
{If role == Dev:} For Developers: Write tests you’d want to inherit. No flaky tests, no “run twice” culture, no mystery failures.
{If role == Lead:} For Tech Leads: Enforce these standards in code review. Flaky test PRs don’t merge. Period.
{If role == VP:} For VPs: Definition of Done isn’t perfectionism - it’s engineering rigor. Flaky tests erode trust in CI/CD.
Documentation: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/explanation/test-quality-standards/
Knowledge Fragment: test-quality.md has execution limits and criteria”
Present this content:
”### 🎯 Session 2 Key Takeaways
1. Testing is Engineering
2. Risk-Based Testing
3. Definition of Done
4. Quality Standards = Engineering Rigor
You now understand the WHY behind TEA principles!“
Display:
”### ✅ Knowledge Check
3 questions to validate your understanding. Passing: ≥70% (2 of 3 correct).”
Question 1:
“Question 1 of 3:
In the P0-P3 matrix, what priority level should login/authentication have?
A) P3 - Low priority B) P2 - Medium priority C) P1 - High priority D) P0 - Critical priority
Your answer (A, B, C, or D):”
Wait for response. Validate:
Store result
Question 2:
“Question 2 of 3:
What is the problem with using sleep(5000) instead of waitFor conditions?
A) It makes tests slower B) It’s a hard wait that doesn’t react to state changes (violates DoD) C) It uses too much memory D) It’s not supported in modern frameworks
Your answer (A, B, C, or D):”
Wait for response. Validate:
waitFor to react to conditions.”Store result
Question 3:
“Question 3 of 3:
What does “self-cleaning tests” mean in TEA Definition of Done?
A) Tests automatically fix their own bugs B) Tests delete/deactivate entities they create during testing C) Tests run faster by cleaning up code D) Tests remove old test files
Your answer (A, B, C, or D):”
Wait for response. Validate:
Store result
Calculate score:
Display results:
“Quiz Results: {score}/100
{If score >= 70:} ✅ Passed! You understand core testing concepts.
{If score < 70:} ⚠️ Below passing. Would you like to:
{Wait for response if < 70, handle R or C}”
Create {sessionNotesFile} using {sessionNotesTemplate} with session-02 content including:
Load {progressFile} and update session-02-concepts:
status: 'completed'completed_date: {current_date}score: {score}notes_artifact: '{sessionNotesFile}'Update progress metrics:
sessions_completed by 1completion_percentagenext_recommended: 'session-03-architecture'Update stepsCompleted array:
Save the updated progress file.
Display:
“🎉 Session 2 Complete!
Your Score: {score}/100
Session notes saved: {sessionNotesFile}
You now understand:
Next: Session 3 (Architecture & Patterns) or explore any session from the menu.
Progress: {completion_percentage}% complete ({sessions_completed} of 7 sessions)”
Display: Select an Option: [A] Advanced Elicitation [P] Party Mode [C] Continue to Session Menu
Master Rule: Teach, quiz, generate notes, update progress, return to hub.