Commands
These commands cover the whole cycle, plus api for spec-driven API testing. Syntax below is quoted from the
repository README (v0.6.0).
Quick reference
Section titled “Quick reference”| Command | Syntax | Purpose |
|---|---|---|
session | cairn session capture --url <loginUrl> --name <s> | Capture a login session once → .auth/ (cairn login shorthand; session ls / rm) |
observe | cairn observe --url <u> [--session <s>] | ARIA snapshot + interactive elements + screenshot |
design | cairn design --url <u> --session <s> [--checklist <f>] [--style <s>] [--fresh] | Test cases only (ATC/MTC .md + selectors), no code |
automate | cairn automate --run <dir> [--validate --session <s>] | @playwright/test from ATC-* cases |
promote | cairn promote --run <dir> --cases <ids> [--session <s>] | Promote manual MTC case(s) to ATC |
explore | cairn explore --url <u> --session <s> [--checklist <f>] [--fresh] | Full pipeline (cases → code → validate → repair → Pilot) |
api | cairn api --spec <path|url> [--base-url <u>] [--negative] [--scenarios] [--adversarial [styles]] | Generate (and, with --base-url, run + assert status/contract) happy-path, negative-schema, multi-endpoint-scenario, and adversarial cases from an OpenAPI 3.x spec |
experiment | cairn experiment --dataset <d> --candidate name=file | Compare prompt versions on a dataset |
Command cards
Section titled “Command cards”Capture a login session once into .auth/ (a Playwright storageState); later runs reuse it with
--session myapp. cairn login is a shorthand; cairn session ls / rm manage saved sessions.
Navigate, wait for SPA hydration, capture an ARIA snapshot + screenshot, and extract interactive elements. Useful to sanity-check what the agent can see.
Explore and write methodical test cases (ATC + MTC) — no code. Optionally steer with a checklist file and a style.
Generate @playwright/test specs from a run’s ATC cases; with --validate, execute and
self-repair them too.
Convert reviewed manual case(s) to automatable in place (.md only) — the next automate picks
them up.
The whole cycle in one run, ending with a Pilot verdict.
Generate test cases from an OpenAPI 3.x spec — happy-path, negative-schema, multi-endpoint
scenarios, and adversarial (normal/curious/psycho/hacker) styles. With --base-url, run
them and assert status + contract (ajv).
Compare prompt versions on a dataset, side by side.