---
roadcrew_template_name: "epic-test-plan.template.md"
roadcrew_template_type: "template"
roadcrew_template_version: "v1.0"
roadcrew_last_updated: "2025-01-25"
roadcrew_min_version: "1.5.0"
roadcrew_license: "Apache-2.0"
roadcrew_copyright: "Copyright (c) 2025 North Star Holdings, LLC"
spdx_license_identifier: "Apache-2.0"
---

# Epic [NUMBER] Test Plan: [Epic Title]

**Epic:** #[NUMBER]
**Created:** [Date]
**Project Type:** [Node.js/Python/Go/Web App/Library/CLI Tool]
**Deployment Method:** [GitHub Actions/Vercel/Docker/Local/Manual/None]
**Test Framework:** [Jest/Playwright/pytest/Go test/None]
**Breaking Changes:** [Yes/No]
**Schema Changes:** [Yes/No]

---

## 📋 Test Environment

Detected from `memory-bank/techContext.md`:

- **Project Type:** [Detected type]
- **Deployment:** [Detected deployment method]
- **Test Framework:** [Detected test framework]
- **Base Branch:** [dev/main/master]
- **Schema Management:** [Prisma/SQL/TypeORM/None]

---

## ✅ Pre-Deployment Checklist

Before running tests:

- [ ] Current branch: `epic-[NUMBER]`
- [ ] All code changes committed
- [ ] No uncommitted changes
- [ ] Rebased from base branch
- [ ] Dependencies installed (`npm install` / `pip install -r requirements.txt` / etc.)
- [ ] Environment variables configured
- [ ] Database seeded (if applicable)

### Schema Migrations (if applicable)
- [ ] Migrations created: `npx prisma migrate dev`
- [ ] Schema changes applied successfully
- [ ] Rollback tested
- [ ] Migration documented

---

## 🧪 Automated Tests

**Total Automated Tests:** [count]

### Unit Tests
- [ ] All unit tests pass
- [ ] New unit tests added for new functionality
- [ ] Edge cases covered
- [ ] Error handling tested

**Coverage Target:** [X%]
**Current Coverage:** [Y%]

### Integration Tests
- [ ] Component integration tests pass
- [ ] API endpoint tests pass (if applicable)
- [ ] Database integration tests pass (if applicable)

### E2E Tests (if applicable)
- [ ] Critical user flows tested
- [ ] Browser compatibility tested
- [ ] Mobile responsiveness tested

**Automated Test Execution:**
```bash
# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run specific test suite
npm test -- epic-[NUMBER]
```

**Expected Results:**
- All tests pass
- Coverage meets or exceeds target
- No test warnings or deprecations
- Test execution time < [X minutes]

---

## 👤 Manual Acceptance Tests

**Total Manual Tests:** [count]

### Test 1: [Feature Area Name]

#### Test 1.1: [Specific Test Name]

**Steps:**
1. [Action verb] [specific action]
2. [Action verb] [specific action]
3. [Action verb] [specific action]
4. [Action verb] [specific action]

**Expected Results:**
1. [Specific expected outcome]
2. [Specific expected outcome]
3. [Specific expected outcome]
4. [Specific expected outcome]

**Status:** ⬜ Not Run | ✅ Passed | ⚠️ Issue Found

---

#### Test 1.2: [Specific Test Name]

**Steps:**
1. [Action verb] [specific action]
2. [Action verb] [specific action]
3. [Action verb] [specific action]

**Expected Results:**
1. [Specific expected outcome]
2. [Specific expected outcome]
3. [Specific expected outcome]

**Status:** ⬜ Not Run | ✅ Passed | ⚠️ Issue Found

---

### Test 2: [Feature Area Name]

#### Test 2.1: [Specific Test Name]

**Steps:**
1. [Action verb] [specific action]
2. [Action verb] [specific action]
3. [Action verb] [specific action]

**Expected Results:**
1. [Specific expected outcome]
2. [Specific expected outcome]
3. [Specific expected outcome]

**Status:** ⬜ Not Run | ✅ Passed | ⚠️ Issue Found

---

## 🔗 Integration Tests

Tests that verify multiple components working together:

### Integration Test 1: [Test Name]

**Purpose:** Verify [specific integration point]

**Steps:**
1. [Action verb] [specific action]
2. [Action verb] [specific action]
3. [Action verb] [specific action]

**Expected Results:**
1. [Specific expected outcome]
2. [Specific expected outcome]

**Status:** ⬜ Not Run | ✅ Passed | ⚠️ Issue Found

---

## 🔄 Regression Tests

Ensure existing features still work:

### Regression Test 1: [Feature Name]

**Steps:**
1. [Action verb] [specific action]
2. [Action verb] [specific action]

**Expected Results:**
1. [Feature works as before]
2. [No degradation in performance]

**Status:** ⬜ Not Run | ✅ Passed | ⚠️ Issue Found

---

## ⚡ Performance Tests

(If applicable for this epic)

### Performance Test 1: [Test Name]

**Metric:** [Load time / Response time / Throughput / etc.]

**Baseline:** [X ms / Y requests/sec / etc.]

**Target:** [X ms / Y requests/sec / etc.]

**Steps:**
1. [Action verb] [specific action]
2. Measure [specific metric]
3. Compare to baseline

**Expected Results:**
1. [Metric] meets or exceeds target
2. No performance regression from baseline

**Status:** ⬜ Not Run | ✅ Passed | ⚠️ Issue Found

---

## 💥 Breaking Changes Tests

(If this epic introduces breaking changes)

### Breaking Change 1: [Description]

**Impact:** [What breaks / Who is affected]

**Migration Path:** [How users upgrade]

**Test:**
1. Verify old behavior no longer works (expected)
2. Verify new behavior works correctly
3. Verify migration guide is accurate
4. Test upgrade path from previous version

**Documentation:**
- [ ] Breaking change documented in PR
- [ ] Migration guide written
- [ ] CHANGELOG.md updated
- [ ] Version bump planned (major version)

**Status:** ⬜ Not Run | ✅ Passed | ⚠️ Issue Found

---

## 📊 Test Results Summary

**Execution Date:** [Date]
**Tester:** [Name]
**Environment:** [Local/Staging/Preview/Production]

### Automated Tests
- ✅ Passed: [count]
- ❌ Failed: [count]
- ⏭️ Skipped: [count]
- **Coverage:** [X%]

### Manual Tests
- ✅ Passed: [count]
- ⚠️ Issues Found: [count]
- ⬜ Not Run: [count]

### Issues Found

#### Issue 1: [Brief Description]
- **Severity:** Critical / High / Medium / Low
- **Test:** [Which test revealed it]
- **Description:** [Detailed description]
- **Fix Status:** [Not Started / In Progress / Fixed / Won't Fix]
- **GitHub Issue:** [Link if created]

---

## 🎯 Completion Criteria

### Required for PR Creation:
- [ ] All automated tests pass
- [ ] All critical manual tests pass
- [ ] No high-severity issues remaining
- [ ] Test coverage meets target
- [ ] Performance meets targets (if applicable)

### Required for Merge:
- [ ] All tests pass
- [ ] All issues resolved or documented
- [ ] Breaking changes documented (if applicable)
- [ ] Migration guide complete (if applicable)
- [ ] PR approved by reviewers

---

## 📝 Notes

[Any additional context, known limitations, or special considerations]

---

## 🔗 Related Links

- Epic Issue: #[NUMBER]
- Implementation PR: #[NUMBER]
- Related Specs: [Link to specs]
- Deployment URL: [Link if applicable]

