ReferenceCLI commands
automax run, test
Generate BDD specs and execute Playwright for a project.
run (alias test)
automax run [-p <slug>] [-e <env>] [-t <expr>] [-l <layer>]... [-b <browser>]... [-m <module>]... [--process <name>]
[--project-matrix] [--device <name>] [--headed] [-w <n>] [--shard <i/n>] [--retries <n>]
[--grep <pattern>] [--feature <path>] [--scenario <name>] [--run-id <id>] [--artifacts-dir <dir>]
[--no-lint] [--ingest | --no-ingest] [--allure] [--har-update | --har-replay] [--strict]
[--update-snapshots] [--ui] [--debug] [--list] [--repeat-each <n>] [--fail-on-flaky]
[--max-failures <n>] [--timeout <ms>] [--reporter <name[=file]>]... [--reporter-mode <mode>] [--trigger <kind>]| Flag | Meaning |
|---|---|
-p, --project <slug> | project slug (default: the only project, otherwise required) |
-e, --env <name> | environment (default: envs.default) |
-t, --tags <expr> | Cucumber tag expression, e.g. "@smoke and not @mock"; a comma list means OR |
-l, --layer <layer> | ui, api, hybrid, recorded; repeatable |
-b, --browser <name> | chromium, firefox, webkit, mobile-chrome, mobile-safari; repeatable |
-m, --module <name> | restrict to a module; repeatable |
--process <name> | apply a named process from the project or workspace YAML; explicit flags override its fields |
--project-matrix | every browser declared in the project YAML |
--device <name> | Playwright device name for mobile emulation |
--headed | visible browsers |
-w, --workers <n> | parallel workers |
--shard <i/n> | shard, e.g. 1/3 |
--retries <n> | retries per test (default: retries.ci in CI, retries.local elsewhere) |
--grep <pattern> | passed to Playwright --grep |
--feature <path> | only this feature file (relative to features/) |
--scenario <name> | only scenarios whose title contains this text |
--run-id <id> | run id (default: UUID v7) |
--artifacts-dir <dir> | artifacts root (default: .automax/runs) |
--no-lint | skip feature lint before running |
--ingest / --no-ingest | force or skip database ingest (default: ingest when a database is configured) |
--allure | also produce allure-results |
--har-update | record or refresh HAR files for @har scenarios |
--har-replay | replay HAR files for @har scenarios |
--strict | with --har-replay: abort any request that is not in the HAR (offline run) |
--update-snapshots | refresh @visual baselines |
--ui, --debug | Playwright UI mode, Playwright inspector |
--list | print the Playwright projects and tests that would run, then stop |
--repeat-each <n> | repeat each test n times |
--fail-on-flaky | exit 1 when any test is flaky |
--max-failures <n> | stop after n failures |
--timeout <ms> | per-test timeout override |
--reporter <name[=file]> | Playwright reporter override; repeatable |
--reporter-mode <mode> | default, server (line output for the web UI), quiet |
--trigger <kind> | recorded in run.json: cli, ui, ci, agent, mcp, schedule (default cli) |
Lifecycle:
Generated specs go to .features-gen/<runId>/<slug>/<layer>/ and are removed after the run, so concurrent runs never race. When a tag expression matches no scenario the run exits 0 with a warning.
Exit codes: 0 pass, 1 failures, 2 configuration error, 3 lint errors, 130 cancelled.
bun run automax run -p demo-shop -e staging -l api
bun run automax run -p demo-shop -e staging -l ui -b chromium -t @smoke
bun run automax run -p demo-shop -e staging --project-matrix -t "@smoke or @sanity"
bun run automax run -p demo-shop --process api-contract
bun run automax run -p demo-shop --module cart -t @regression --listSee also automax watch for the hot-reload variant.