This documentation is available as Markdown. For the complete index, see llms.txt. Skip to content

Configuration

For the complete documentation index, see llms.txt

Configuration lives in unotest/unotest.config.{js,mjs,ts} — inside the suite package, next to your scenarios — and is auto-discovered by the CLI and MCP server. A config file left at the project root is refused with migration instructions rather than silently ignored.

Every field is optional. A partially written section (linter with only rules, failureBundle with only tier3) is merged with the defaults key by key; arrays replace as a whole.

FieldTypeDefaultDescription
baseUrlstring (URL)Base for relative goto() paths. If unset, scenarios use absolute URLs.
webServer.commandstringShell command that starts the app under test (npm run dev, python manage.py runserver). Unset webServer entirely and the app is expected to be running already.
webServer.urlstring (URL)URL probed for readiness — any HTTP response counts as up. Usually the same as baseUrl, but a dev server may answer on a different port than the tests navigate to.
webServer.reuseExistingServerbooleantrueReuse a server that is already up instead of spawning a second one. false makes an occupied URL an error — CI strictness.
webServer.timeoutMsint > 060000How long to wait for the URL to come up after spawning.
browsers("chromium" / "firefox" / "webkit")[]["chromium"]Browser families to run. Single in dev; CI can run all three.
channel"chrome" / "msedge" / "chrome-beta" / nullnullFor chromium: use a system browser (zero download) or bundled Chromium (null).
viewport{ width, height }{ 1280, 720 }Browser viewport size.
retry.countint 0–100Retries for transient failures. Off in dev; 1+ in CI.
retry.on("transient" / "network" / "crash")[]["transient"]Which failure classes retry. Assertion failures never retry.
failureBundle.tier1true (locked)trueAlways on: error + console + semantic DOM snapshot + DSL trace.
failureBundle.tier2booleantrueScreenshots (viewport + element-focused).
failureBundle.tier3{ network, video }{ false, false }HAR + video. Not wired yet — leave off.
failureBundle.retention{ runs, days }{ 20, 7 }Keep N recent runs; delete older than D days.
failureBundle.storageDirstring.unotest/failuresWhere failure bundles are written.
dialogPolicy"accept" / "dismiss" / "manual""accept"How native dialogs (alert/confirm) are handled.
storageStatestring (path)Playwright storageState.json for cached login.
defaultTimeoutMsint3000Action / locator-resolution timeout. Override per call.
defaultNavigationTimeoutMsint15000Navigation timeout (goto/reload/waitForUrl).
testDirstringunotest/e2eScenario directory.
helpersDirstringunotest/e2e/_helpersHelper functions directory.
sandbox.shellCwdstringcwdWorking directory for shell() and waitForFile().
sandbox.shellTimeoutMsnumber120000Wall-clock budget per shell() call; on expiry the child is killed and the step fails. Per-call override: shell(..., {timeoutMs}).
sandbox.exportSecretsstring[]Names of .secrets* variables exported into shell() subprocess env (masked in logs). Secrets stay out of process.env otherwise.
sandbox.databasestring (URL)Connection string for dbQuery/dbExec (postgres://, mysql://, sqlite:).
sandbox.apiBaseUrlstring (URL)Base URL for apiCall(method, path).
sandbox.uploadDirstringcwdRoot for upload() fixture paths. Relative paths resolve against it and may not escape it.
linter.enabledbooleantrueEnable the scenario linter.
linter.rulesRecord<ruleId, "off" / "warn" / "error">per-ruleSeverity overrides per rule — every id and its default is in the linter reference.
mcp.transport"stdio""stdio"MCP server transport (stdio in the current release).
queue.enabledbooleantrueSerialise runs of this project through the filesystem queue in unotest/.queue/, so a run started from the viewer, a terminal and an agent never drive the same browser at once. false (or UNOTEST_NO_QUEUE=1 for one command) starts every run immediately.
queue.concurrencyint > 01How many runs may be in flight for one environment. 1 is strict first-come-first-served. A collection counts as ONE run — its workers still run in parallel inside it.
schedules{ collection | scenario, cron, env?, prepare? }[][]What should run on its own, declared next to the tests it runs. An entry targets either a collection or a single test (scenario). This is the hand-written half: the viewer writes its own entries to unotest/schedules.yaml, and npx @unotest/web schedules prints both merged (the file wins on a duplicate target). Data only — the CLI never executes a schedule: cron is run by the box or CI that hosts your runs. cron is a standard 5-field expression in the executor’s timezone; prepare is a shell command run before the run, inside the same run slot, whose failure is reported as “the environment was not prepared” rather than a red suite.