Existing stack

You already have Playwright, CI, and probably Restormel Keys. Testing adds a goal-based orchestration layer—not a replacement migration.

Integration principles:

  • Keep Playwright as the browser substrate; Testing owns suites, goals, verdicts, and CI contract.
  • Map high-value journeys first (5–8 goals) instead of porting an entire legacy suite day one.
  • Resolve models through Keys so test spend and provider policy match production semantics.
  • Reuse existing secrets machinery—Testing configs hold opaque refs, not raw keys.

Recipe: pnpm monorepo with apps/web (Plotbudget-style)

Many teams keep a single repo with pnpm-workspace.yaml, an app under apps/web (or similar), and Playwright already installed for classic E2E. Restormel Testing sits alongside that setup: same Node toolchain, same browser install, one more dev dependency for the CLI.

  1. Workspace root — from the repo root, add pnpm add -D @restormel/testing-cli@^0.1.1 (or add to the workspace package that runs CI). Pin the same minor line across @restormel/testing-* if you depend on more than the CLI.
  2. Playwright browsers — keep your existing pnpm exec playwright install chromium (or full install) step; Testing’s browser adaptor uses Playwright. Run it in CI before testing run.
  3. Config file — place restormel-testing.yaml where your team can find it (often repo root or apps/web/). Run pnpm exec testing init once if you want a scaffold, then edit suites and goals.
  4. Coexist with Playwright config — keep playwright.config.ts for any legacy tests you still run. Testing does not require deleting it. Over time, migrate only the journeys that benefit from goal-based criteria.
  5. Global setup and auth storage — if you already use globalSetup to mint session cookies and write storageState JSON, reuse that artefact: in restormel-testing.yaml, set auth_mode: storage_state and auth_ref to the path (or env:VAR pointing at a path produced in CI). Do not commit raw storage files with live secrets; generate them in CI from test credentials.
  6. CI job order — install deps → install Playwright browsers → (optional) run your global setup or publish a preview URL → testing validatetesting run or the composite GitHub Action. Use the same RESTORMEL_KEYS_* secrets pattern as local.
  7. GitHub Actions — prefer the composite action under packages/testing-github-action (published path on npm) so the run contract matches local. See CI guide, HTTP runs vs Action, and Fork PRs and workflow triggers.

Off-registry consumption and npm pins: docs/testing/oss-consumption.md.

See Escaping brittle E2E, Plot dogfooding, and the inventory phase.