AutoMax
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>]
FlagMeaning
-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-matrixevery browser declared in the project YAML
--device <name>Playwright device name for mobile emulation
--headedvisible 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-lintskip feature lint before running
--ingest / --no-ingestforce or skip database ingest (default: ingest when a database is configured)
--allurealso produce allure-results
--har-updaterecord or refresh HAR files for @har scenarios
--har-replayreplay HAR files for @har scenarios
--strictwith --har-replay: abort any request that is not in the HAR (offline run)
--update-snapshotsrefresh @visual baselines
--ui, --debugPlaywright UI mode, Playwright inspector
--listprint the Playwright projects and tests that would run, then stop
--repeat-each <n>repeat each test n times
--fail-on-flakyexit 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 --list

See also automax watch for the hot-reload variant.

On this page