# AI browser tests

Source: https://www.observeone.com/docs/product/ai-browser-tests

- [Docs](/docs)
- [Product Guides](/docs/product)
- AI browser tests

# AI browser tests

Copy Markdown

Generate Playwright tests from a URL with Autopilot, run them on a schedule, and let healing repair broken selectors. Covers planning, credentials, regeneration and CI.

Autopilot writes browser tests for you. Point it at a URL, and it explores the site, plans a set of scenarios, generates Playwright specs, and reruns them on a schedule.

The dashboard calls this Autopilot. The CLI calls the same objects suites (obs suite). One suite is one target site plus the tests generated for it.

## Generate a suite[#](#generate-a-suite)

From the dashboard, open Suites and choose New. From the terminal:

Copy

obs suite generate https://example.com --name "Smoke Tests" --max-tests 5

obs suite generate https://example.com --name "Smoke Tests" --max-tests 5

Generation runs in two stages. First the planner explores the site and writes a plan: a list of scenarios worth testing, one planned file each. Then generation turns each planned file into a Playwright spec.

--max-tests accepts 1 to 30 and defaults to 10. Your plan may cap it lower, and also caps how many suites you can save.

Use --plan-only when you want to read the plan before spending anything on generation:

Copy

obs suite generate https://example.com --plan-only

obs suite generate https://example.com --plan-only

## Steer the planner[#](#steer-the-planner)

--instructions appends persistent guidance to the planner prompt, up to 4000 characters. It is saved on the suite and reused every time the plan is rebuilt. It reaches the planner only, so regenerating an existing planned file will not pick up a change to it.

Copy

obs suite generate https://example.com \

 --instructions "Log in via the /login form before testing checkout"

obs suite generate https://example.com \

 --instructions "Log in via the /login form before testing checkout"

--allow-form-submit lets the agents submit non-auth forms. Leave it off when the target has forms you would rather not fire in anger, like a contact form that emails a real inbox.

## Credentials[#](#credentials)

Tests that need a login take variables. Pass --var KEY=VALUE for a value, or --var KEY alone to be prompted with the input masked. For anything real, keep them in an uncommitted file:

Copy

obs suite generate https://example.com --var-file .env.secrets

obs suite generate https://example.com --var-file .env.secrets

Update them later with obs suite secrets <id>.

## Run and schedule[#](#run-and-schedule)

obs suite run <id> triggers an execution, obs suite status <id> reports on it, and obs suite wait <id> <executionId> blocks until it finishes, which is what you want in a pipeline.

Give a suite a cron at generation with --cron, or manage it afterwards:

Copy

obs suite schedule <id> --cron "0 */6 * * *" --enable

obs suite schedule <id> --disable

obs suite schedule <id> --cron "0 */6 * * *" --enable

obs suite schedule <id> --disable

Each suite execution spends one AI verification. Planning, generation and healing spend AI credits, a separate allowance. On the lower plans credits arrive as a one-time grant rather than monthly, so a credit pack is how you keep regenerating.

## Healing[#](#healing)

When a run fails because a selector no longer matches, healing rewrites that selector and saves a new version of the spec. Edits are restricted to the locator, so a heal cannot quietly change what the test asserts and hand you a green run that proves nothing.

Trigger one with obs suite heal <id>, and read what happened with obs suite heal-history <test-id>.

## Editing the plan[#](#editing-the-plan)

The plan is a file you can own. Pull the suite down, edit PLAN.md, push it back:

Copy

obs suite pull <id>

obs suite push <id>

obs suite pull <id>

obs suite push <id>

A pushed edit marks the planned files it affects as stale. obs suite get <id> counts them, and obs suite regenerate <id> regenerates exactly those. Add --dry-run to see the targets first. --all is a fallback: when nothing is stale or missing it regenerates every non-dismissed planned file rather than doing nothing.

To drop a scenario you do not want:

Copy

obs suite dismiss-planned <suite-id> --planned-file <file>

obs suite restore-planned <suite-id> --planned-file <file>

obs suite dismiss-planned <suite-id> --planned-file <file>

obs suite restore-planned <suite-id> --planned-file <file>

## CI[#](#ci)

Install the GitHub app and pick the repo in the web UI. The CLI manages the integration afterwards:

Copy

obs suite ci status <id>

obs suite ci webhook-token <id> # rotates, invalidating the previous token

obs suite ci disconnect <id>

obs suite ci status <id>

obs suite ci webhook-token <id> # rotates, invalidating the previous token

obs suite ci disconnect <id>

## Next steps[#](#next-steps)

- [CLI reference: suites](/docs/cli/suites) for every subcommand and flag.

- [Netlify extension](/docs/product/netlify-extension) to run a suite against a deploy preview.

- [Core concepts](/docs/get-started/core-concepts) for how verifications and credits differ.

## Related comparisons

Picking between the tools mentioned here? Side-by-side breakdowns below.

- [ObserveOne vs Playwright](/compare/observeone-vs-playwright)

## Swap out part of your stack

Looking for a different fit? Start here.

- [Best Playwright alternatives](/alternatives/playwright)

Was this page helpful?
