Docs
Journey definitions
The versioned YAML format nono uses to describe replayable browser journeys, plus the .nono/config.yaml reference.
A journey is a replayable description of one user flow: where to go, what to do, and what must be true afterwards. Journeys live in .nono/journeys/<name>.yaml (.yml is also read) and are meant to be committed and reviewed like code.
You can create journeys three ways:
nono record <name>— click through the flow in a headed browser.nono_create_journey— an agent creates one from structured inputs over MCP.- By hand, in YAML.
Example#
The checkout journey shipped with the demo shop (examples/shop-demo/.nono/journeys/checkout.yaml):
version: 1
name: checkout
description: A shopper adds a product, pays with the test card and sees the confirmation.
steps:
- navigate: /
- click: { testId: add-to-cart-1 }
- click: { testId: cart-link }
- checkpoint: cart
- click: { testId: go-to-checkout }
- fill: { testId: name, value: Ada Lovelace }
- fill: { testId: email, value: ada@example.com }
- fill: { testId: card-number, value: { env: NONO_TEST_CARD } }
- click: { testId: submit-order }
- waitFor: { testId: order-success }
- checkpoint: confirmation
assertions:
- id: order-created
type: http_response
method: POST
path: /api/orders
expectedStatus: 201
- id: order-status-confirmed
type: http_response_field
method: POST
path: /api/orders
field: status
equals: confirmed
- id: single-order-request
type: request_count
method: POST
path: /api/orders
expected: 1
- id: success-visible
type: visible
testId: order-success
- id: lands-on-order-page
type: url
path: /orders/:id
- type: no_uncaught_exceptions
- type: no_console_errors
The card number is read from the NONO_TEST_CARD environment variable at run time (the demo accepts only the test card 4242 4242 4242 4242), so no card data is stored in the file.
Top-level fields#
Unknown keys are rejected.
| Field | Required | Description |
|---|---|---|
version |
yes | Format version. Must be 1. |
name |
yes | Lowercase letters, digits, - and _, starting with a letter or digit, at most 64 characters. Must match the file name. Used in nono verify <name>. |
description |
no | Human-readable purpose. |
target.baseUrl |
no | Base URL for this journey. Must be an approved target (see Targets). |
viewport |
no | { width, height }, each 200–4000. Overrides browser.viewport from the config. |
steps |
yes | 1–500 browser actions, run in order. |
assertions |
no | Up to 500 checks evaluated after the steps run. Defaults to []. See Assertions. |
expectedOutcomes |
no | Prose list of expected outcomes for humans and agents. Never evaluated. |
The journey's hash (journeyHash in the manifest) is a SHA-256 of the parsed definition, recorded with every run and baseline. Comments and key order do not affect it; any change to a step, assertion or field does.
A journey with no assertions can still run, but its verdict is UNVERIFIED: nono only observed that the steps executed.
Targets and URL precedence#
The base URL for a run is chosen in this order:
--urlon the command line (ortargetUrlin the MCPnono_run_journey/nono_verifytools).--profile <name>(orprofileover MCP), which usesprofiles.<name>.baseUrlfrom the config.- The journey's
target.baseUrl. target.baseUrlfrom.nono/config.yaml.
nono record uses --url if given, otherwise the config's target.baseUrl.
Whatever the source, the URL must be an approved target: a loopback host (localhost, 127.0.0.1, ::1, 0.0.0.0, *.localhost), the host of the config's target.baseUrl, or a host listed in target.allowedHosts. Anything else produces EXECUTION_ERROR with code TARGET_NOT_ALLOWED. Top-level navigations to other hosts during a run are blocked too.
Before running, nono polls <baseUrl><target.readyPath> until it answers with a status below 500 (for up to target.startupTimeoutMs, capped at 10 seconds). nono does not start your application.
Steps#
Each step is a single-key map. Every step that waits for the page uses browser.timeoutMs (default 10 seconds) unless stated otherwise. If a step fails, the remaining steps are skipped and the run is not complete.
navigate#
- navigate: /products
Relative paths are joined to the base URL. Absolute http(s) URLs are allowed if they are approved targets. Waits for the load event, with target.startupTimeoutMs as the timeout.
click, hover, check, uncheck#
- click: { testId: add-to-cart-1 }
- hover: { role: button, name: Account }
- check: { label: Accept terms }
- uncheck: "#newsletter"
The value is a locator. A bare string is a CSS selector.
fill#
- fill: { testId: email, value: ada@example.com }
- fill: { testId: password, value: { env: SHOP_PASSWORD } }
Locator fields go inline next to value. value is either a literal string or { env: NAME }, where NAME is an UPPER_SNAKE_CASE environment variable read at run time. If the variable is not set, the step fails and the run ends with EXECUTION_ERROR. Use { env: … } for anything secret; nono_create_journey warns when a literal fill value looks sensitive.
select#
- select: { testId: shipping-method, value: express }
Selects an <option> by value or label. Locator fields go inline next to value.
press#
- press: { key: Enter }
- press: { testId: search, key: Enter }
Presses a key (Playwright key names such as Enter, Escape, Tab, ArrowDown). With locator fields it presses on that element; without them, on the page.
waitFor#
- waitFor: { testId: order-success }
- waitFor: { selector: ".spinner", state: hidden, timeoutMs: 20000 }
Waits for the first matching element to reach state: visible (default), hidden, attached or detached. timeoutMs is optional, at most 120000.
waitForRequest#
- waitForRequest: { method: POST, path: /api/orders }
Waits until a response arrives for a request whose path matches path (and method, if given). path uses the same pattern syntax as assertions: :param matches one segment, * matches anything, the query string is ignored.
wait#
- wait: 500
A fixed delay in milliseconds (0–30000). Prefer waitFor or waitForRequest; fixed delays make journeys slow and flaky.
checkpoint#
- checkpoint: confirmation
Names a point in the journey (letters, digits, - and _, starting with a letter or digit). At each checkpoint nono waits up to 3 seconds for the network to go idle, then captures a viewport screenshot and a normalized DOM snapshot, and evaluates any DOM-based assertions that reference it.
A checkpoint named final is always captured after the last step, even if you do not declare one. Assertions that do not name a checkpoint are evaluated there.
Locators#
A locator is either a string (a CSS selector) or an object with one or more of these fields:
| Field | Matches |
|---|---|
testId |
data-testid attribute. Most stable. |
role |
ARIA role, optionally with name (exact accessible name). |
label |
Form control by its exact label text. |
placeholder |
Input by its exact placeholder. |
text |
Element by its exact visible text. |
selector |
CSS selector. |
nth |
Zero-based index when several elements match. |
If several are given, the first present in this order is used: testId, role, label, placeholder, text, selector. Assertions accept a narrower set of locator fields; see Assertions.
Avoid structural selectors such as div > div:nth-child(3) > button. They break on unrelated layout changes and produce false regressions; the recorder and nono_create_journey warn about them.
Determinism and normalization#
Real applications produce values that change on every run. Before comparing a run with its baseline, nono normalizes:
- Text in DOM snapshots and in console and exception messages: UUIDs, ISO timestamps, epoch milliseconds, long hex strings and clock times are replaced with placeholders, and whitespace is collapsed.
- Request paths: numeric, UUID, long hex and long opaque ID segments become
:id, so/orders/8f1c…and/orders/1a2b…compare as the same request.
You can mark more volatile content:
- Add
data-nono-volatileto an element: its text is replaced with<volatile>in DOM snapshots and the element is masked in screenshots. The demo shop does this for the order ID. - Add
data-nono-maskto mask an element in screenshots. - List CSS selectors in
normalization.volatileSelectors(text becomes<volatile>) orredaction.maskSelectors(masked in screenshots). - List attribute names in
normalization.ignoreAttributesto drop them from DOM snapshots.
normalization.volatileFields is accepted by the config schema but not used by the current engine.
Meaningful differences are never ignored automatically. If a value matters, assert on it explicitly.
Tips for stable journeys:
- Seed or reset test data before running, so the flow starts from a known state.
- Add
data-testidattributes to elements you interact with or assert on. - Put a
waitForbefore acheckpointso the UI has settled.
Recording a journey#
nono record checkout --url http://127.0.0.1:4400
nono first checks that the application responds, then opens a headed Chromium window with a toolbar offering Checkpoint, Assert visible and Finish. Navigations, clicks, form fills, selects, checkbox changes and Enter/Escape key presses are captured as steps. When you click Finish (or close the window), nono writes the journey with suggested assertions:
- a
visibleassertion for each element picked with Assert visible; http_responseandrequest_countfor each state-changing (non-GET) same-origin request observed;no_uncaught_exceptions.
Sensitive inputs are never recorded as literal values. Password fields, fields with cc-*, one-time-code, current-password or new-password autocomplete, fields whose name matches the sensitive-field pattern, and fields marked data-nono-sensitive become { env: NAME } references. nono prints the variable names to set before replaying.
If .nono/journeys/<name>.yaml already exists, the recording is saved as <name>-recorded.yaml instead of overwriting it. Review the suggested assertions before relying on them.
Recording needs a display. On a headless machine, write the journey by hand or ask your agent to create it with nono_create_journey.
Running a journey#
nono replay checkout # run + assertions, no baseline comparison
nono verify checkout # run + assertions + baseline comparison
See Baselines for how baseline comparison works.
Configuration reference#
nono init writes .nono/config.yaml. It is safe to commit; never put secrets in it. Unknown keys are rejected. Every section except version, project and target is optional, and omitted keys take the defaults below.
version: 1
project:
name: shop-demo # required
framework: node # optional, informational
packageManager: npm # optional, informational
devCommand: npm run start # optional; shown in "start your app" hints
target:
baseUrl: http://127.0.0.1:4400 # required
allowedHosts: [] # extra hosts nono may drive; loopback is always allowed
readyPath: / # polled before each run
startupTimeoutMs: 15000 # readiness wait (capped at 10 s) and navigate timeout
browser:
headless: true
viewport: { width: 1280, height: 800 }
timeoutMs: 10000 # default timeout for each browser action
# executablePath: /path/to/chromium
capture:
includePaths: [] # if non-empty, only matching request paths are recorded
excludePaths: ["/_next/static/*", "/favicon.ico", "*.map"]
responseFields: {} # path pattern -> JSON dot paths to keep, e.g. { "/api/orders": [status] }
maxResponseBytes: 262144 # larger JSON bodies are not parsed
resourceTypes: [document, xhr, fetch]
redaction:
headers: [] # extra header names to redact
fields: [] # extra field names to redact (* wildcard, case-insensitive)
maskSelectors: [] # CSS selectors masked in screenshots
patterns: [] # extra regular expressions redacted from captured text
normalization:
volatileFields: [] # accepted but not used by the current engine
volatileSelectors: [] # CSS selectors whose text becomes <volatile> in DOM snapshots
ignoreAttributes: [] # attributes dropped from DOM snapshots
verification:
requireBaseline: false # true: verify without a baseline is UNVERIFIED
screenshotThreshold: 0.1 # per-pixel colour sensitivity (0-1)
maxScreenshotDiffRatio: 0.01 # fraction of pixels allowed to differ
timingRegressionFactor: 3
compareScreenshots: true # compare baseline checkpoint screenshots during verify
regressions:
severity: {} # override severity per kind, or per kind:METHOD
failOn: [critical, high, medium]
storage:
retentionDays: 30 # default for nono prune
maxArtifactBytes: 10485760 # 10 MiB per artifact
maxRunBytes: 104857600 # 100 MiB per run
profiles: {} # e.g. { staging: { baseUrl: https://staging.example.com } }
# cloud: { apiUrl: …, projectId: … } # optional; accepted by the schema, not read by the CLI
A profile's host must also be an approved target, so add it to target.allowedHosts. Regression kinds and severities are listed in Baselines; redaction is covered in Privacy and security.