Skip to content
TestingModesModesModes

Modes

A gate's mode says what kind of test it is — independent of layer (which says which philosophy it serves). See /testing/pyramid for the layer mapping.

Static layer

  • static — file-level analysis. Route coverage, schema-runtime parity, lint-shaped invariants. The bread and butter of contract gates.
  • drift — generated-file vs. source comparison. OpenAPI ↔ MCP catalog, TS tokens ↔ CSS, Prisma schema ↔ generated client.

Unit layer

  • unit — pure-function tests with specific inputs. Vitest-shaped.
  • property — fast-check generative tests. "For all inputs in domain D, predicate P holds."
  • fuzz — adversarial / random inputs. Catches what enumerated tests don't.
  • mutation — Stryker-shaped. Mutates code, verifies tests catch the mutation. Proves your tests can catch bugs.

Integration layer

  • integration — multiple units composed. API + DB, MCP + spec, dispatcher + router.
  • contract — consumer-provider contract tests (Pact-shaped).
  • visual — pixel regression (Chromatic / Percy).

E2E layer

  • e2e — real-browser user flows (Playwright).
  • smoke — single-page health checks on a running app.
  • synthetic — production canary / probe.

AI / Evals layer

  • eval — capability + behavior baselines on AI emissions.
  • safety — alignment / refusal / constitutional checks.
  • red-team — adversarial prompts (jailbreak, prompt injection, data extraction).
  • prompt-regression — captured-prompt replay against current model + prompt.
  • hallucination — factuality / citation grounding against authoritative oracles.
  • llm-judge — LLM-as-judge for soft outputs (voice, style, tone).
  • determinism — same input → same output. For structured-output flows.

On this page