ui-automation-control-plane

Testing Strategy

Prooflane uses a testing pyramid with governed release gates, not one giant bucket of tests.

Think of it like building trust in layers:

Pyramid

Layer Primary tools What it protects Fastest commands
Unit vitest, pytest local logic, formatting helpers, store behavior, API helpers bash scripts/lib/pnpm-safe.sh --dir apps/command-center run test -- --config vitest.config.ts, bash scripts/lib/python-exec.sh pytest -q -o addopts='' -n 0
Contract OpenAPI checks, API route tests, MCP doc contract API semantics, generated-client scope, MCP registry/docs drift bash scripts/lib/pnpm-safe.sh mcp:doc:contract, bash scripts/lib/node-bin.sh tsx contracts/scripts/generate-client.ts --verify
Integration backend proof tests, workflow/API integration suites proof surfaces, manual-gate flows, template/runs bridging uv run --extra dev pytest --no-cov services/api/tests/test_proof_api.py -q, bash scripts/lib/pnpm-safe.sh test:backend:integration-gate
Component / shell app vitest, Playwright CT command center view semantics, a11y, shell guidance, locale-aware UX bash scripts/lib/pnpm-safe.sh --dir apps/command-center run test -- --config vitest.config.ts, pnpm test:ct
E2E / governed Playwright frontend e2e, pnpm uiq run, MCP smoke operator-visible flows, governed artifacts, MCP adapter truth pnpm test:e2e:frontend:critical, bash scripts/lib/pnpm-safe.sh mcp:smoke

Coverage Rules

Fast Verification Order

Use this order when you want the fastest trustworthy signal:

  1. bash scripts/docs-gate.sh
  2. bash scripts/lib/pnpm-safe.sh --dir apps/command-center run test -- --config vitest.config.ts
  3. uv run --extra dev pytest --no-cov services/api/tests/test_proof_api.py -q
  4. bash scripts/lib/pnpm-safe.sh mcp:doc:contract
  5. bash scripts/lib/pnpm-safe.sh mcp:smoke

Truthful Test Vocabulary

Do not collapse these into one generic word like “tests passed”.

That would be like saying “the building is safe” after checking only the light switches. Prooflane wants you to say which layer passed.