Getting Started with Test Architect
Welcome! Test Architect (TEA) Lite is the simplest way to get started with TEA - just use the automate workflow (e.g., /automate in Claude Code) to generate tests for existing features. Perfect for beginners who want to learn TEA fundamentals quickly.
What Youâll Build
Section titled âWhat Youâll BuildâBy the end of this 30-minute tutorial, youâll have:
- A working Playwright test framework
- Your first risk-based test plan
- Passing tests for an existing demo app feature
TEA Approaches Explained
Section titled âTEA Approaches ExplainedâBefore we start, understand the three ways to use TEA:
- TEA Lite (this tutorial): Beginner using just the
automateworkflow to test existing features - TEA Solo: Using TEA standalone without full BMad Method integration
- TEA Integrated: Full BMad Method with all TEA workflows across phases
This tutorial focuses on TEA Lite - the fastest way to see TEA in action.
Step 0: Setup (2 minutes)
Section titled âStep 0: Setup (2 minutes)âWeâll test TodoMVC, a standard demo app used across testing documentation.
Demo App: https://todomvc.com/examples/react/dist/
No installation needed - TodoMVC runs in your browser. Open the link above and:
- Add a few todos (type and press Enter)
- Mark some as complete (click checkbox)
- Try the âAllâ, âActiveâ, âCompletedâ filters
Youâve just explored the features weâll test!
Step 1: Install BMad and Scaffold Framework (10 minutes)
Section titled âStep 1: Install BMad and Scaffold Framework (10 minutes)âInstall BMad Method
Section titled âInstall BMad MethodâInstall BMad (see installation guide for latest command).
When prompted:
- Select modules: Choose âBMM: BMad Methodâ (press Space, then Enter)
- Project name: Keep default or enter your project name
- Experience level: Choose âbeginnerâ for this tutorial
- Planning artifacts folder: Keep default
- Implementation artifacts folder: Keep default
- Project knowledge folder: Keep default
- Enable TEA Playwright Model Context Protocol (MCP) enhancements? Choose âNoâ for now (weâll explore this later)
- Using playwright-utils? Choose âNoâ for now (weâll explore this later)
BMad is now installed! Youâll see a _bmad/ folder in your project.
Load TEA Agent
Section titled âLoad TEA AgentâStart a new chat with your AI assistant (Claude, etc.) and type:
teaThis loads the Test Architect agent. Youâll see TEAâs menu with available workflows.
Scaffold Test Framework
Section titled âScaffold Test FrameworkâIn your chat, run:
frameworkTEA will ask you questions:
Q: Whatâs your tech stack? A: âWeâre testing a React web application (TodoMVC)â
Q: Which test framework? A: âPlaywrightâ
Q: Testing scope? A: âEnd-to-end (E2E) testing for a web applicationâ
Q: Continuous integration/continuous deployment (CI/CD) platform? A: âGitHub Actionsâ (or your preference)
TEA will generate:
tests/directory with Playwright configplaywright.config.tswith base configuration- Sample test structure
.env.examplefor environment variables.nvmrcfor Node version
Verify the setup:
npm installnpx playwright installYou now have a production-ready test framework!
Step 2: Your First Test Design (5 minutes)
Section titled âStep 2: Your First Test Design (5 minutes)âTest design is where TEA shines - risk-based planning before writing tests.
Run Test Design
Section titled âRun Test DesignâIn your chat with TEA, run:
test-designQ: System-level or epic-level? A: âEpic-level - I want to test TodoMVCâs basic functionalityâ
Q: What feature are you testing? A: âTodoMVCâs core operations - creating, completing, and deleting todosâ
Q: Any specific risks or concerns? A: âWe want to ensure the filter buttons (All, Active, Completed) work correctlyâ
TEA will analyze and create test-design-epic-1.md with:
-
Risk Assessment
- Probability Ă Impact scoring
- Risk categories (TECH, SEC, PERF, DATA, BUS, OPS)
- High-risk areas identified
-
Test Priorities
- P0: Critical path (creating and displaying todos)
- P1: High value (completing todos, filters)
- P2: Medium value (deleting todos)
- P3: Low value (edge cases)
-
Coverage Strategy
- E2E tests for user workflows
- Which scenarios need testing
- Suggested test structure
Review the test design file - notice how TEA provides a systematic approach to what needs testing and why.
Step 3: Generate Tests for Existing Features (5 minutes)
Section titled âStep 3: Generate Tests for Existing Features (5 minutes)âNow the magic happens - TEA generates tests based on your test design.
Run Automate
Section titled âRun AutomateâIn your chat with TEA, run:
automateQ: What are you testing? A: âTodoMVC React app at https://todomvc.com/examples/react/dist/ - focus on the test design we just createdâ
Q: Reference existing docs? A: âYes, use test-design-epic-1.mdâ
Q: Any specific test scenarios? A: âCover the P0 and P1 scenarios from the test designâ
TEA will generate:
tests/e2e/todomvc.spec.ts with tests like:
import { test, expect } from '@playwright/test';
test.describe('TodoMVC - Core Functionality', () => { test.beforeEach(async ({ page }) => { await page.goto('https://todomvc.com/examples/react/dist/'); });
test('should create a new todo', async ({ page }) => { // TodoMVC uses a simple input without placeholder or test IDs const todoInput = page.locator('.new-todo'); await todoInput.fill('Buy groceries'); await todoInput.press('Enter');
// Verify todo appears in list await expect(page.locator('.todo-list li')).toContainText('Buy groceries'); });
test('should mark todo as complete', async ({ page }) => { // Create a todo const todoInput = page.locator('.new-todo'); await todoInput.fill('Complete tutorial'); await todoInput.press('Enter');
// Mark as complete using the toggle checkbox await page.locator('.todo-list li .toggle').click();
// Verify completed state await expect(page.locator('.todo-list li')).toHaveClass(/completed/); });
test('should filter todos by status', async ({ page }) => { // Create multiple todos const todoInput = page.locator('.new-todo'); await todoInput.fill('Buy groceries'); await todoInput.press('Enter'); await todoInput.fill('Write tests'); await todoInput.press('Enter');
// Complete the first todo ("Buy groceries") await page.locator('.todo-list li .toggle').first().click();
// Test Active filter (shows only incomplete todos) await page.locator('.filters a[href="#/active"]').click(); await expect(page.locator('.todo-list li')).toHaveCount(1); await expect(page.locator('.todo-list li')).toContainText('Write tests');
// Test Completed filter (shows only completed todos) await page.locator('.filters a[href="#/completed"]').click(); await expect(page.locator('.todo-list li')).toHaveCount(1); await expect(page.locator('.todo-list li')).toContainText('Buy groceries'); });});TEA also creates:
tests/README.md- How to run tests, project conventions- Definition of Done summary - What makes a test âgoodâ
With Playwright Utils (Optional Enhancement)
Section titled âWith Playwright Utils (Optional Enhancement)âIf you have tea_use_playwright_utils: true in your config, TEA generates tests using production-ready utilities:
Vanilla Playwright:
test('should mark todo as complete', async ({ page, request }) => { // Manual API call const response = await request.post('/api/todos', { data: { title: 'Complete tutorial' } }); const todo = await response.json();
await page.goto('/'); await page.locator(`.todo-list li:has-text("${todo.title}") .toggle`).click(); await expect(page.locator('.todo-list li')).toHaveClass(/completed/);});With Playwright Utils:
import { test } from '@seontechnologies/playwright-utils/api-request/fixtures';import { expect } from '@playwright/test';
test('should mark todo as complete', async ({ page, apiRequest }) => { // Typed API call with cleaner syntax const { status, body: todo } = await apiRequest({ method: 'POST', path: '/api/todos', body: { title: 'Complete tutorial' } });
expect(status).toBe(201); await page.goto('/'); await page.locator(`.todo-list li:has-text("${todo.title}") .toggle`).click(); await expect(page.locator('.todo-list li')).toHaveClass(/completed/);});Benefits:
- Type-safe API responses (
{ status, body }) - Automatic retry for 5xx errors
- Built-in schema validation
- Cleaner, more maintainable code
See Integrate Playwright Utils to enable this.
Step 4: Run and Validate (5 minutes)
Section titled âStep 4: Run and Validate (5 minutes)âTime to see your tests in action!
Run the Tests
Section titled âRun the Testsânpx playwright testYou should see:
Running 3 tests using 1 worker
â tests/e2e/todomvc.spec.ts:7:3 âș should create a new todo (2s) â tests/e2e/todomvc.spec.ts:15:3 âș should mark todo as complete (2s) â tests/e2e/todomvc.spec.ts:30:3 âș should filter todos by status (3s)
3 passed (7s)All green! Your tests are passing against the existing TodoMVC app.
View Test Report
Section titled âView Test Reportânpx playwright show-reportOpens a beautiful HTML report showing:
- Test execution timeline
- Screenshots (if any failures)
- Trace viewer for debugging
What Just Happened?
Section titled âWhat Just Happened?âYou used TEA Lite to:
- Scaffold a production-ready test framework (
framework) - Create a risk-based test plan (
test-design) - Generate comprehensive tests (
automate) - Run tests against an existing application
All in 30 minutes!
What You Learned
Section titled âWhat You LearnedâCongratulations! Youâve completed the TEA Lite tutorial. You learned:
Quick Reference
Section titled âQuick Referenceâ| Command | Purpose |
|---|---|
tea | Load the TEA agent |
framework | Scaffold test infrastructure |
test-design | Risk-based test planning |
automate | Generate tests for existing features |
TEA Principles
Section titled âTEA Principlesâ- Risk-based testing - Depth scales with impact (P0 vs P3)
- Test design first - Plan before generating
- Network-first patterns - Tests wait for actual responses (no hard waits)
- Production-ready from day one - Not toy examples
Understanding ATDD vs Automate
Section titled âUnderstanding ATDD vs AutomateâThis tutorial used the automate workflow to generate tests for existing features (tests pass immediately).
When to use automate:
- Feature already exists
- Want to add test coverage
- Tests should pass on first run
When to use atdd (Acceptance Test-Driven Development):
- Feature doesnât exist yet (Test-Driven Development workflow)
- Want failing tests BEFORE implementation
- Following red â green â refactor cycle
See How to Run ATDD for the test-drive development (TDD) approach.
Next Steps
Section titled âNext StepsâLevel Up Your TEA Skills
Section titled âLevel Up Your TEA SkillsâHow-To Guides (task-oriented):
- How to Run Test Design - Deep dive into risk assessment
- How to Run ATDD - Generate failing tests first (TDD)
- How to Set Up CI Pipeline - Automate test execution
- How to Review Test Quality - Audit test quality
Explanation (understanding-oriented):
- TEA Overview - Complete TEA capabilities
- Testing as Engineering - Why TEA exists (problem + solution)
- Risk-Based Testing - How risk scoring works
Reference (quick lookup):
- TEA Command Reference - All 8 TEA workflows
- TEA Configuration - Config options
- Glossary - TEA terminology
Try TEA Solo
Section titled âTry TEA SoloâReady for standalone usage without full BMad Method? Use TEA Solo:
- Run any TEA workflow independently
- Bring your own requirements
- Use on non-BMad projects
See TEA Overview for engagement models.
Go Full TEA Integrated
Section titled âGo Full TEA IntegratedâWant the complete quality operating model? Try TEA Integrated with BMad Method:
- Phase 2: Planning with non-functional requirements (NFR) assessment
- Phase 3: Architecture testability review
- Phase 4: Per-epic test design â
atddâautomate - Release Gate: Coverage traceability and gate decisions
See BMad Method Documentation for the full workflow.
Common Questions
Section titled âCommon QuestionsâWhy canât my tests find elements?
Section titled âWhy canât my tests find elements?âTodoMVC doesnât use test IDs or accessible roles consistently. The selectors in this tutorial use CSS classes that match TodoMVCâs actual structure:
// TodoMVC uses these CSS classes:page.locator('.new-todo') // Input fieldpage.locator('.todo-list li') // Todo itemspage.locator('.toggle') // Checkbox
// If testing your own app, prefer accessible selectors:page.getByRole('textbox')page.getByRole('listitem')page.getByRole('checkbox')In production code, use accessible selectors (getByRole, getByLabel, getByText) for better resilience. TodoMVC is used here for learning, not as a selector best practice example.
How do I fix network timeouts?
Section titled âHow do I fix network timeouts?âIncrease timeout in playwright.config.ts:
use: { timeout: 30000, // 30 seconds}Getting Help
Section titled âGetting Helpâ- Documentation: https://docs.bmad-method.org
- GitHub Issues: https://github.com/bmad-code-org/bmad-method/issues
- Discord: Join the BMAD community