--- name: generate-testplan description: Structured test plan from implementation plan / assessment. --- # Skill: generate-testplan Structured test plan from implementation plan / assessment. ## Invoked by 📋 Planner mode ## Required Inputs | Input | Source | Example | |-------|--------|---------| | `TICKET_KEY` | Jira issue key | `PROJECT-123` | | `MODULE` | Module/component name | `auth`, `api`, `core` | | `PLAN_PATH` | Path to plan.md | `docs/auth/PROJECT-123/PROJECT-123-plan.md` | ## Output Markdown file: `docs///-testplan.md` ## Steps ### 1. Read the implementation plan Understand which classes/methods are being added or modified, data flows affected, database changes, and integration points. ### 2. Identify testable units | Category | What to test | Test type | |----------|-------------|-----------| | New methods | Input/output, edge cases, null handling | Unit | | Modified methods | Regression + new behavior | Unit | | Database changes | Migration up/down, data integrity | Integration | | Data flows | End-to-end processing | Integration | | Error paths | Invalid input, missing data, error responses | Unit | ### 3. Generate test plan document ```markdown # Test Plan: **Date:** **Module:** **Author:** Lumen (Planner) **Status:** Draft v1 **Based on:** -plan.md --- ## Test Overview | ID | Description | Type | Class | Status | |----|-------------|------|-------|--------| | T-01 | | Unit | | ⬜ | | T-02 | | Unit | | ⬜ | | T-03 | | Integration | | ⬜ | Status: ⬜ Open | ✅ Passed | ❌ Failed | ⏭️ Skipped --- ## Test Cases ### T-01: **Type:** Unit **Class:** `.` **Method:** `test()` **Preconditions:** - **Scenarios:** | # | Input | Expected Result | |---|-------|----------------| | a | | | | b | | | | c | | | --- ## Test Data ## Test Coverage | Component | Unit | Integration | Total | |-----------|------|-------------|-------| | | 3 | 1 | 4 | | | 2 | 0 | 2 | | **Total** | **5** | **1** | **6** | ``` ### 4. Cross-reference with plan Verify every implementation step has at least one test case. Flag gaps as warnings. ### 5. Store in BigMind ```python memory_store_fact( category="codebase", fact=f"{TICKET_KEY}: Testplan with {N} test cases (Unit: {u}, Integration: {i})" ) ``` ## Test Naming Conventions - Test class: `Test.java` or `Test.java` - Test method: `test__()` or `test()` for simple cases - Location: mirror source structure under `src/test/java/` ## Test ID Format - Sequential: T-01, T-02, ..., T-nn - IDs are stable — don't renumber on revision, append new tests at the end