Technical guide

Testing & QA

Tests that catch the failures that matter, at the cheapest layer.

On this page
  1. Overview
  2. Trade-offs
  3. Architecture
  4. Workflow
  5. Challenges
  6. Example

All guides

← All guides

Overview

Business rules get unit tests; integrations get contract tests; critical paths get end-to-end checks.

Agent outputs are tested with evals, not just snapshots.

Trade-offs

Unit vs end-to-end
Many fast unit tests, a few end-to-end checks on revenue paths.
Mocks vs real services
Mock at the boundary, verify against a sandbox nightly.

Architecture

Detect. An alert or report signals something may be wrong.

Illustrative diagram. For the end-to-end view, see the architecture on the Developers home.

Workflow

Rules

One test per rule.

What we design for

  • Tests that only check markup
  • No test data that looks like production
  • Manual regression before every release

One test per rule

Illustrative examplets
test("orders over the approval limit need a person", () => {
  expect(needsApproval({ total: 5001, limit: 5000 })).toBe(true);
  expect(needsApproval({ total: 4999, limit: 5000 })).toBe(false);
});