Files
2025-11-30 08:37:27 +08:00

111 lines
5.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ln-350-story-test-planner - State Diagram</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
<link rel="stylesheet" href="../shared/css/diagram.css">
</head>
<body>
<div class="container">
<header>
<h1>🎯 ln-350-story-test-planner</h1>
<p class="subtitle">Test Task Planner - State Diagram</p>
</header>
<div class="info-box">
<h3>📋 Overview</h3>
<ul>
<li><strong>Purpose:</strong> Create final Story task after manual testing passes (invoked by ln-340-story-quality-gate Pass 1)</li>
<li><strong>Philosophy:</strong> Minimum Viable Testing - Start with 2 baseline E2E tests (positive + negative), add more ONLY with critical justification</li>
<li><strong>Realistic Goal:</strong> 2-7 tests per Story (hard limit: 28)</li>
<li><strong>Output:</strong> Comprehensive task with 11 sections: E2E-first Risk-Based Testing (Priority ≥15, tests OUR logic ONLY)</li>
<li><strong>Risk Priority:</strong> Business Impact × Probability, Priority ≥15 MUST be tested</li>
<li><strong>Critical Justification:</strong> Each test beyond baseline 2 requires documented answer: "Why does this test OUR business logic (not framework/library/database)?"</li>
<li><strong>Delegation:</strong> Delegates task creation to ln-311-task-creator (CREATE mode) or ln-312-task-replanner (REPLAN mode) with taskType: "test"</li>
</ul>
</div>
<div class="diagram-container">
<div class="mermaid">
graph TD
Start([Start: Create Story Finalizer Task<br/>Invoked by ln-340-story-quality-gate Pass 1]) --> Phase1[Phase 1: Discovery<br/>Team ID + Parent Story]
Phase1 --> Phase2[Phase 2: Load Context<br/>Step 0-2 Combined]
subgraph Context [Phase 2 Steps]
Step0[Step 0: Load Manual Test Results<br/>Parse Linear comment Format v1.0<br/>AC + Test Results + Edge Cases + Errors + Integration]
Step0 --> Step1[Step 1: Analyze Story<br/>Load full Story description 8 sections]
Step1 --> Step2[Step 2: Analyze Tasks<br/>Load all Done implementation tasks]
end
Phase2 --> Step0
Step2 --> Phase3
Phase3[Phase 3: Risk-Based Test Planning]
subgraph RiskPlanning [Minimum Viable Testing - Risk-Based]
Risk1[Step 1: Risk Assessment<br/>Priority = Business Impact × Probability]
Risk1 --> Risk2[Step 2: E2E Test Selection<br/>2 baseline ALWAYS + 0-3 additional Priority ≥15]
Risk2 --> Risk2_5{Step 2.5: Critical Justification<br/>Tests OUR business logic?<br/>Not framework/library/database?}
Risk2_5 -->|Pass| Risk3[Step 3: Unit Test Selection<br/>0-15 tests ONLY complex logic Priority ≥15]
Risk2_5 -->|Fail| Risk2
Risk3 --> Risk3_5{Critical Justification<br/>Tests OUR logic?}
Risk3_5 -->|Pass| Risk4[Step 4: Integration Test Selection<br/>0-8 tests ONLY if E2E doesn't cover Priority ≥15]
Risk3_5 -->|Fail| Risk3
Risk4 --> Risk4_5{Critical Justification<br/>Tests OUR logic?}
Risk4_5 -->|Pass| Risk5[Step 5: Validation<br/>2-7 realistic goal max 28 auto-trim]
Risk4_5 -->|Fail| Risk4
end
Phase3 --> Risk1
Risk5 --> Phase4
Phase4[Phase 4: Impact Analysis]
subgraph Impact [5 Impact Areas]
Impact1[Step 1: Existing Tests to Fix/Update]
Impact2[Step 2: Infrastructure Changes<br/>package.json Docker configs]
Impact2_5[Step 3: Configuration Management<br/>Environment variables secrets configs]
Impact3[Step 4: Documentation Updates<br/>README tests/README CHANGELOG]
Impact4[Step 5: Legacy Code Cleanup<br/>workarounds backward compat deprecated]
end
Phase4 --> Impact1
Impact1 --> Impact2
Impact2 --> Impact2_5
Impact2_5 --> Impact3
Impact3 --> Impact4
Impact4 --> Phase5
Phase5[Phase 5: Generate Complete Story Finalizer Task<br/>11 sections: Context Risk Matrix E2E Integration Unit<br/>Coverage DoD Existing Tests Infra Docs Cleanup]
Phase5 --> Confirm{User confirms?}
Confirm -->|No| Phase5
Confirm -->|Yes| CheckExisting{Check existing test task}
CheckExisting -->|Exists| Replan[Phase 6: Delegate to ln-312-task-replanner<br/>REPLAN mode with taskType: test]
CheckExisting -->|None| Create[Phase 6: Delegate to ln-311-task-creator<br/>CREATE mode with taskType: test]
Replan --> End([End])
Create --> End([End])
%% Styling
classDef discovery fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
classDef analysis fill:#FFF9C4,stroke:#F57C00,stroke-width:2px
classDef decision fill:#FFE0B2,stroke:#E64A19,stroke-width:2px
classDef action fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
class Phase1,Phase2,Step0,Step1,Step2 discovery
class Phase3,Risk1,Risk2,Risk2_5,Risk3,Risk3_5,Risk4,Risk4_5,Risk5,Phase4,Impact1,Impact2,Impact2_5,Impact3,Impact4,Phase5 analysis
class Confirm,CheckExisting decision
class Create,Replan action
</div>
</div>
<footer>
<p>ln-350-story-test-planner v7.0.0 | Minimum Viable Testing | Mermaid.js</p>
</footer>
</div>
<script>
mermaid.initialize({ startOnLoad: true, theme: 'default', flowchart: { useMaxWidth: true, htmlLabels: true, curve: 'basis' } });
</script>
</body>
</html>