Back to Kavex Intelligence

Kavex Intelligence · Developer discipline

Testing & QA

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

Architecture

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.

Implementation flow

  1. Rules

    One test per rule.

  2. Contracts

    Shape checks per integration.

  3. Flows

    Critical paths end to end.

  4. Evals

    Scored agent cases.

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.

One test per rule

Illustrative code · ts

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);
});