# 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!** ๐Ÿš€