BMAD-METHOD/expansion-packs/bmad-production-qa/README.md

283 lines
9.0 KiB
Markdown

# BMAD Production QA Expansion Pack
Transform your BMAD development workflow with comprehensive, production-ready QA and testing capabilities. This expansion pack integrates seamlessly with BMAD's natural language approach while providing enterprise-grade testing automation.
## 🎯 What This Expansion Pack Provides
### Complete QA Integration
- **Enhanced Story Creation** with comprehensive testing requirements
- **Specialized QA Agents** for different testing domains
- **Production QA Workflow** with quality gates and validation
- **Tool-Agnostic Approach** supporting any testing framework
- **Automated Quality Gates** with pass/fail criteria
- **Comprehensive Test Coverage** across all testing types
### Key Features
-**E2E Testing** - Complete user journey validation
-**API Testing** - Backend functionality verification
-**Performance Testing** - Load, stress, and capacity validation
-**Security Testing** - Vulnerability scanning and compliance
-**Visual Regression** - UI consistency across browsers
-**Accessibility Testing** - WCAG compliance validation
-**CI/CD Integration** - Automated testing in pipelines
## 🚀 Quick Start
### 1. Installation
This expansion pack is already integrated into your BMAD fork. No additional installation needed!
### 2. Initialize Testing Framework
```bash
# Activate QA Test Engineer
@qa-test-engineer
# Set up testing infrastructure
*setup-testing-framework
```
### 3. Enhanced Story Creation
```bash
# Stories now include comprehensive testing requirements
@sm *draft
# Creates story with E2E, API, Performance, and Security test scenarios
```
### 4. Parallel Development & Testing
```bash
# Development track
@dev *develop-story docs/stories/1.1.story.md
# Testing track (run in parallel)
@qa-test-engineer *create-e2e-tests docs/stories/1.1.story.md
@qa-test-engineer *create-api-tests docs/stories/1.1.story.md
```
## 🧪 Available QA Agents
### QA Test Engineer (Alex)
**Primary testing specialist for comprehensive test automation**
- Creates E2E, API, and integration test suites
- Sets up testing frameworks and CI/CD integration
- Generates test data and fixtures
- Validates test coverage and quality
**Key Commands:**
- `*create-e2e-tests {story}` - Generate E2E test suite
- `*create-api-tests {story}` - Generate API test collection
- `*setup-testing-framework` - Initialize testing infrastructure
- `*analyze-test-coverage` - Review test coverage metrics
### QA Performance Engineer (Morgan)
**Specialized in performance, load, and scalability testing**
- Creates load testing scenarios
- Performs stress and spike testing
- Establishes performance baselines
- Generates capacity planning analysis
**Key Commands:**
- `*create-load-test {story}` - Generate load test scenarios
- `*create-stress-test {story}` - Create stress test scenarios
- `*analyze-performance-baseline` - Establish performance baseline
- `*create-capacity-plan` - Generate capacity planning analysis
### QA Security Engineer (Riley)
**Expert in security testing and vulnerability assessment**
- Performs comprehensive security scans
- Creates penetration testing scenarios
- Validates OWASP compliance
- Conducts vulnerability assessments
**Key Commands:**
- `*security-scan {story}` - Perform comprehensive security scan
- `*vulnerability-assessment` - Conduct vulnerability assessment
- `*owasp-compliance-check` - Validate OWASP Top 10 compliance
- `*create-threat-model` - Generate threat modeling analysis
### QA Test Lead (Jordan)
**Strategic coordinator for all testing activities**
- Creates comprehensive test strategies
- Manages quality gates and criteria
- Coordinates testing across all specialties
- Generates quality reports and metrics
**Key Commands:**
- `*create-test-strategy` - Generate comprehensive test strategy
- `*create-quality-gates` - Define quality gates and criteria
- `*coordinate-testing` - Manage all testing activities
- `*create-test-reports` - Generate comprehensive test reports
## 🔄 Enhanced Development Workflow
### Traditional BMAD Flow
```
Planning → SM creates story → Dev implements → QA reviews → Done
```
### Enhanced Production QA Flow
```
Planning → Test Strategy → SM creates story with QA →
Dev implements ←→ QA creates test suites (parallel)
Execute tests → Quality gates → Production ready
```
## 📊 Quality Gates
Stories must pass all quality gates before production deployment:
### Automated Gates
- ✅ Unit test coverage ≥ 80%
- ✅ All E2E tests pass
- ✅ API tests pass with proper error handling
- ✅ Performance meets defined SLAs
- ✅ Security scans show no critical vulnerabilities
- ✅ Accessibility standards met (if applicable)
### Manual Gates (Optional)
- 🔍 Security review for sensitive features
- 🔍 Performance validation for critical paths
- 🔍 UX review for user-facing changes
## 🛠️ Tool Support (Framework Agnostic)
### E2E Testing
- **Playwright** (recommended for modern web apps)
- **Cypress** (excellent developer experience)
- **Selenium** (maximum browser compatibility)
- **WebdriverIO** (enterprise flexibility)
### API Testing
- **Bruno** (Git-friendly, version controlled)
- **Postman + Newman** (industry standard)
- **REST Client** (VS Code integrated)
### Performance Testing
- **k6** (JavaScript-based, developer-friendly)
- **Artillery** (Node.js, excellent CI/CD integration)
- **Locust** (Python-based, scalable)
### Security Testing
- **OWASP ZAP** (comprehensive security scanning)
- **Snyk** (dependency vulnerability scanning)
- **Custom security test suites**
## 📁 Project Structure
```
your-project/
├── expansion-packs/
│ └── bmad-production-qa/ # This expansion pack
├── tests/ # Generated by QA agents
│ ├── e2e/ # End-to-end tests
│ ├── api/ # API tests
│ ├── performance/ # Performance tests
│ ├── security/ # Security tests
│ └── visual/ # Visual regression tests
├── test-reports/ # Test execution reports
├── docs/
│ ├── test-strategy.md # Overall testing strategy
│ └── stories/ # Stories with QA requirements
└── .github/workflows/
└── test.yml # CI/CD testing pipeline
```
## 🔄 Automated Sync with Upstream BMAD
This fork automatically syncs with upstream BMAD weekly:
- **Automatic sync** every Sunday
- **Preserves QA integration** during updates
- **Creates PR** for review when changes detected
- **Handles conflicts** gracefully with notifications
### Manual Sync
```bash
# Trigger manual sync
gh workflow run "Sync with Upstream BMAD and Re-apply QA Integration"
# Or locally
git fetch upstream
git merge upstream/main
# QA integration preserved automatically
```
## 📖 Example Usage
### Creating a Story with QA Integration
```bash
@sm *draft
```
**Result**: Story created with comprehensive testing requirements including:
- E2E user journey scenarios
- API endpoint validation requirements
- Performance criteria
- Security considerations
- Accessibility requirements
### Implementing Tests
```bash
@qa-test-engineer *create-e2e-tests docs/stories/1.1.user-login.story.md
```
**Result**:
- Asks for your preferred framework (Playwright, Cypress, etc.)
- Generates complete test suite based on story requirements
- Creates test data and fixtures
- Provides execution instructions
## 🎓 Best Practices
### Story Creation
1. Always use `@sm *draft` for QA-integrated stories
2. Review testing requirements before development
3. Ensure acceptance criteria cover testable outcomes
### Test Development
1. Create tests in parallel with development
2. Start with happy path scenarios
3. Add edge cases and error handling
4. Maintain test data separately from test logic
### Quality Gates
1. Run tests locally before commits
2. Fix failing tests immediately
3. Maintain test coverage above thresholds
4. Review performance impacts regularly
## 🆘 Troubleshooting
### Common Issues
**Tests not generating**
- Ensure story file exists and has proper AC
- Check that testing framework is selected
- Verify expansion pack is properly loaded
**Quality gates failing**
- Check test execution logs in test-reports/
- Ensure all dependencies are installed
- Verify test environments are accessible
**Sync issues with upstream**
- Check .github/workflows/sync-upstream-bmad.yml
- Resolve any merge conflicts manually
- Contact maintainers if automation fails
## 🤝 Contributing
This expansion pack follows BMAD's contribution guidelines:
1. Maintain tool-agnostic approach
2. Use natural language for requirements
3. Keep agents focused and specialized
4. Provide comprehensive documentation
## 📞 Support
- **Issues**: Create GitHub issues for bugs or feature requests
- **Discussions**: Use GitHub Discussions for questions
- **Documentation**: All docs in this expansion pack
- **Examples**: Check the examples/ directory
---
**Transform your development with production-ready QA!** 🚀