Files
rust_browser/_bmad/bmm/workflows/qa-generate-e2e-tests/instructions.md
Zachary D. Rowitsch 931f17b70e
All checks were successful
ci / fast (linux) (push) Successful in 6m46s
Add BMAD framework, planning artifacts, and architecture decision document
Install BMAD workflow framework with agent commands and templates.
Create product brief, PRD, project context, and architecture decision
document covering networking/persistence strategy, JS engine evolution
path, threading model, web_api scaling, system integration, and
tab/process model. Add generated project documentation (architecture
overview, component inventory, development guide, source tree analysis).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:13:06 -04:00

2.7 KiB

Quinn QA - Automate

Goal: Generate automated API and E2E tests for implemented code.

Scope: This workflow generates tests ONLY. It does not perform code review or story validation (use Code Review CR for that).

Instructions

Step 0: Detect Test Framework

Check project for existing test framework:

  • Look for package.json dependencies (playwright, jest, vitest, cypress, etc.)
  • Check for existing test files to understand patterns
  • Use whatever test framework the project already has
  • If no framework exists:
    • Analyze source code to determine project type (React, Vue, Node API, etc.)
    • Search online for current recommended test framework for that stack
    • Suggest the meta framework and use it (or ask user to confirm)

Step 1: Identify Features

Ask user what to test:

  • Specific feature/component name
  • Directory to scan (e.g., src/components/)
  • Or auto-discover features in the codebase

Step 2: Generate API Tests (if applicable)

For API endpoints/services, generate tests that:

  • Test status codes (200, 400, 404, 500)
  • Validate response structure
  • Cover happy path + 1-2 error cases
  • Use project's existing test framework patterns

Step 3: Generate E2E Tests (if UI exists)

For UI features, generate tests that:

  • Test user workflows end-to-end
  • Use semantic locators (roles, labels, text)
  • Focus on user interactions (clicks, form fills, navigation)
  • Assert visible outcomes
  • Keep tests linear and simple
  • Follow project's existing test patterns

Step 4: Run Tests

Execute tests to verify they pass (use project's test command).

If failures occur, fix them immediately.

Step 5: Create Summary

Output markdown summary:

# Test Automation Summary

## Generated Tests

### API Tests
- [x] tests/api/endpoint.spec.ts - Endpoint validation

### E2E Tests
- [x] tests/e2e/feature.spec.ts - User workflow

## Coverage
- API endpoints: 5/10 covered
- UI features: 3/8 covered

## Next Steps
- Run tests in CI
- Add more edge cases as needed

Keep It Simple

Do:

  • Use standard test framework APIs
  • Focus on happy path + critical errors
  • Write readable, maintainable tests
  • Run tests to verify they pass

Avoid:

  • Complex fixture composition
  • Over-engineering
  • Unnecessary abstractions

For Advanced Features:

If the project needs:

  • Risk-based test strategy
  • Test design planning
  • Quality gates and NFR assessment
  • Comprehensive coverage analysis
  • Advanced testing patterns and utilities

Install Test Architect (TEA) module: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/

Output

Save summary to: {implementation_artifacts}/tests/test-summary.md

Done! Tests generated and verified.