How to Set Up a Test Framework
Use TEA’s *framework workflow to scaffold a production-ready test framework for your project.
When to Use This
Section titled “When to Use This”- No existing test framework in your project
- Current test setup isn’t production-ready
- Starting a new project that needs testing infrastructure
- Phase 3 (Solutioning) after architecture is complete
Prerequisites
Section titled “Prerequisites”- BMad Method installed
- Architecture completed (or at least tech stack decided)
- TEA agent available
1. Load the TEA Agent
Section titled “1. Load the TEA Agent”Start a fresh chat and load the TEA (Test Architect) agent.
2. Run the Framework Workflow
Section titled “2. Run the Framework Workflow”*framework3. Answer TEA’s Questions
Section titled “3. Answer TEA’s Questions”TEA will ask about:
- Your tech stack (React, Node, etc.)
- Preferred test framework (Playwright, Cypress, Jest)
- Testing scope (E2E, integration, unit)
- CI/CD platform (GitHub Actions, etc.)
4. Review Generated Output
Section titled “4. Review Generated Output”TEA generates:
- Test scaffold - Directory structure and config files
- Sample specs - Example tests following best practices
.env.example- Environment variable template.nvmrc- Node version specification- README updates - Testing documentation
What You Get
Section titled “What You Get”tests/├── e2e/│ ├── example.spec.ts│ └── fixtures/├── integration/├── unit/├── playwright.config.ts # or cypress.config.ts└── README.mdOptional: Playwright Utils Integration
Section titled “Optional: Playwright Utils Integration”TEA can integrate with @seontechnologies/playwright-utils for advanced fixtures:
npm install -D @seontechnologies/playwright-utilsEnable during BMad installation or set tea_use_playwright_utils: true in config.
Utilities available: api-request, network-recorder, auth-session, intercept-network-call, recurse, log, file-utils, burn-in, network-error-monitor
Optional: MCP Enhancements
Section titled “Optional: MCP Enhancements”TEA can use Playwright MCP servers for enhanced capabilities:
playwright- Browser automationplaywright-test- Test runner with failure analysis
Configure in your IDE’s MCP settings.
- Run
*frameworkonly once per repository - Run after architecture is complete so framework aligns with tech stack
- Follow up with
*cito set up CI/CD pipeline
Related
Section titled “Related”- TEA Overview - Understanding the Test Architect
- Run Test Design - Creating test plans
- Create Architecture - Architecture workflow