Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

4,300 tests, written by an AI: how they were planned, run and enforced

Description and use

ParkEase, built with Claude Code, adopted a test‑first strategy using real infrastructure and mandatory integration suites, reducing bugs and ensuring code reliability.

Problem

Ensuring AI‑generated code is correct requires a robust testing strategy that treats tests as contracts rather than a post‑hoc phase.

Outcome

Adopting a test‑first, test‑driven workflow with real infrastructure and mandatory suites reduced bugs, ensured critical invariants, and made the testing process a contract that AI‑generated code had to satisfy.

Workflow

  • 1. Write a failing test before code (test‑first).
  • 2. Create a test plan entry for each task in the registry.
  • 3. Use real PostgreSQL 18 with PostGIS in a throwaway container for integration tests.
  • 4. Run four mandatory integration suites (booking concurrency, ledger balance, idempotency, search performance) on every change.
  • 5. Perform stress tests (100 drivers racing for 10 slots).
  • 6. Run API tests through real HTTP to exercise guards and interceptors.
  • 7. Add component tests for new screens and table‑driven tests for data screens.
  • 8. Execute Playwright end‑to‑end runs on phone and desktop sizes with accessibility scans.
  • 9. Run lint, typecheck, unit suites, mandatory integration suites, dependency audit, and secret scan locally before PR.
  • 10. Log gaps such as fixture mismatches and lack of real Android devices.

Evidence

Tests weren’t a phase at the end. They were the contract the generated code had to meet.

Source

Integration tests run against a real PostgreSQL 18 with PostGIS in a throwaway container. No mocked database.

Source

Four integration suites are mandatory on every change: booking concurrency, ledger balance, idempotency, search performance.

Source

API tests go through HTTP. Tests that call a command directly skip the guards, interceptors, status codes and error envelopes.

Source

The last gate before any pull request: lint, typecheck, every unit suite, the four mandatory integration suites, a dependency audit and a secret scan, run locally, with the output pasted into the PR.

Source

  • Record date: 2026-11-02T09:58:49.861Z