Quality Agents

QA Engineer - full-stack testing expert

Key Opinion: Quality agents should run in parallel with implementation, not after. Write tests alongside code, not as an afterthought. This catches bugs earlier, reduces rework, and ensures tests actually match implementation intent.

Overview

The QA Engineer is a full-stack testing expert that handles all aspects of quality assurance. From unit tests to E2E flows, from API validation to accessibility audits, a single agent covers the entire testing spectrum.

AgentFocusCapabilities
QA EngineerFull-stack testingUnit, integration, API, E2E, visual, performance, accessibility

QA Engineer

The QA Engineer validates quality across the entire stack. It writes comprehensive test suites, designs test strategies, and ensures code quality through automated testing.

Testing Domains

DomainFocus AreaTest Types
BackendServer-side testingUnit, integration, API, load, security
FrontendClient-side testingComponent, E2E, visual regression, accessibility
IntegrationCross-system testingContract tests, chaos tests, end-to-end flows

Technologies

  • Test Runners: Jest, Vitest, pytest, Playwright
  • API Testing: Supertest, httpx, REST Client
  • E2E Testing: Playwright, Cypress
  • Visual Regression: Playwright screenshots, Percy, Chromatic
  • Accessibility: axe-core, Pa11y, Lighthouse
  • Load Testing: k6, Artillery, Locust
  • Mocking: MSW, nock, testcontainers

Invoking QA Engineer

# Backend-focused testing
@qa-engineer Write unit tests for src/services/order.service.ts
Cover: order creation, validation, price calculation, edge cases.
Target: 90% coverage. Use Jest with TypeScript.

# Frontend-focused testing
@qa-engineer Create Playwright E2E tests for checkout:
1. Add items to cart
2. Proceed to checkout
3. Fill shipping info
4. Enter payment details
5. Complete order
Include error scenarios and edge cases.

# API integration tests
@qa-engineer Create API tests for the /api/users endpoints:
- GET /api/users (list with pagination)
- POST /api/users (create)
- PATCH /api/users/:id (update)
Include auth scenarios and error cases.

# Accessibility audit
@qa-engineer Create accessibility tests for the main pages:
- Home page
- Product listing
- Checkout flow
Use axe-core integration with Playwright.
Flag any WCAG 2.1 AA violations.

Test Organization Pattern

tests/
├── unit/
│   ├── services/
│   │   ├── order.service.test.ts
│   │   └── user.service.test.ts
│   └── utils/
│       └── validation.test.ts
├── integration/
│   ├── api/
│   │   ├── orders.test.ts
│   │   └── users.test.ts
│   └── database/
│       └── repositories.test.ts
├── e2e/
│   ├── checkout.spec.ts
│   └── auth.spec.ts
└── visual/
    └── components.spec.ts
Coverage Strategy: Aim for high coverage on business logic, lower coverage on glue code. 100% coverage isn't the goal—meaningful coverage is.

Test-First Development

QA Engineer works best when engaged early. Here's how to integrate testing into your development workflow:

Parallel Test Development

# When implementing a new feature, run tests in parallel
@conductor Coordinate feature implementation with tests:

Parallel Track A (Implementation):
  @backend-engineer: Implement order service
  @frontend-engineer: Build order form

Parallel Track B (Tests):
  @qa-engineer: Write order service tests (based on spec)
  @qa-engineer: Write order form E2E tests (based on spec)

Integration Point:
  Both tracks complete → Run full test suite → Fix any gaps

Continuous Quality Checks

# CI pipeline integration
name: Quality Gates

on: [push, pull_request]

jobs:
  unit-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run test:unit -- --coverage
      - run: npx coverage-check --lines 80

  integration-tests:
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:15
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run test:integration

  e2e-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npx playwright install
      - run: npm run test:e2e

  accessibility:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run test:a11y
Pro Tip: Run QA Engineer with the same spec given to engineering agents. This ensures tests match implementation intent and catches spec ambiguities early.

Common Testing Patterns

Pattern: Contract Testing

# Ensure API contracts between services
@qa-engineer Create contract tests for the order-to-payment integration:
- Define expected request/response schemas
- Generate consumer contract
- Verify provider satisfies contract
Use Pact or similar contract testing tool.

Pattern: Chaos Testing

# Test system resilience
@qa-engineer Create chaos tests for the order service:
- Database connection failures
- External payment service timeouts
- Message queue unavailability
Verify graceful degradation and recovery.
Flaky Test Prevention: Always use proper waits and assertions. Never use sleep(). Use waitFor and expect with appropriate timeouts. Flaky tests erode confidence.