How to Set Up a Test Framework with TEA
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
1. Load the TEA Agent
Section titled β1. Load the TEA AgentβStart a fresh chat and load the TEA (Test Engineering 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:
- Frontend/Fullstack: Playwright, Cypress
- Backend (Node.js): Jest, Vitest, or Playwright (API testing via playwright-utils)
- Backend (Python): pytest, or Playwright for Python
- Backend (Java/Kotlin): JUnit, or Playwright for Java
- Backend (Go): Go test
- Backend (C#/.NET): dotnet test / xUnit, or Playwright for .NET
- Backend (Ruby): RSpec
- Testing scope (E2E, integration, unit, API)
- CI/CD platform (GitHub Actions, GitLab CI, Jenkins, Azure DevOps, Harness, etc.)
4. Review Generated Output
Section titled β4. Review Generated OutputβTEA generates:
- Test scaffold β Directory structure and config files (language-idiomatic)
- Sample specs β Example tests following best practices for your framework
.env.exampleβ Environment variable template- Version file β
.nvmrc(Node.js),.python-version(Python),global.json(.NET), etc. - README updates β Testing documentation
What You Get
Section titled βWhat You GetβFrontend/Fullstack (Node.js):
tests/βββ e2e/β βββ example.spec.tsβ βββ fixtures/βββ integration/βββ unit/βββ playwright.config.ts # or cypress.config.tsβββ README.mdBackend (Python example):
tests/βββ unit/β βββ test_example.pyβββ integration/βββ api/βββ conftest.pyβββ README.mdNote: Playwright has official bindings for Python, Java, and .NET β making it viable for API testing across languages, not just Node.js.
Optional: 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 only once per repository β Framework setup is a one-time operation
- Run after architecture is complete β Framework aligns with tech stack
- Follow up with CI setup β Run
cito configure CI/CD pipeline
Next Steps
Section titled βNext StepsβAfter test framework setup:
- Test Design β Create test plans for system or epics
- CI Configuration β Set up automated test runs
- Story Implementation β Tests are ready for development