webtest-ai discover
Runs a bounded model-backed workflow that proposes candidate browser test flows.
webtest-ai discover --url https://app.example --dry-run
webtest-ai discover --url https://app.example --output artifacts/discovery/app.json
webtest-ai discover --target brand-a-en --target brand-b-fr --dry-run
webtest-ai discover --targets brand-a-en,brand-b-fr --dry-run
webtest-ai discover --target all --explore --max-pages 5 --inventory-output artifacts/discovery/ui-inventory.proposed.json --spec-output artifacts/discovery/discovered.md
webtest-ai discover --target all --explore --auth-profile ci-user --refresh-auth --dry-run
Discovery only calls a model when an active model profile is configured. Normal run execution does not need a model and does not delegate pass/fail truth to a model.
When --target is used, WebTest AI expands configured target baseUrl values into seed URLs and passes target metadata such as brand, locale, and intentAliases to the discovery prompt. If UI inventory memory is enabled and present, discovery also includes the reviewed inventory so proposed flows can build on known intent-to-control mappings without executing browser actions.
When --explore is set, WebTest AI opens the seed URLs with the active driver, crawls same-origin links within the configured page/depth budget, and passes bounded page evidence to the discovery prompt. Evidence includes URL patterns, page fingerprints, accessibility candidates, DOM action candidates, and same-origin links. The model can still only return proposals: candidate flows and optional reviewed UI inventory updates.
Browser-backed exploration can prepare configured auth before opening seed URLs. Use --auth-profile <name> to select the reusable/API auth profile, --auth-mode <mode> to override config for one discovery run, and --refresh-auth to force a fresh state where the configured auth flow supports it. The resulting storage state is passed to the active driver session; discovery still receives only bounded, redacted page evidence.
Flags
--url <seed-url>: seed URL. May be repeated.--seed <seed-url>: alias for--url.--target <name|all>/--targets <name,name|all>: configured targets to explore. May be repeated, comma-separated, or set toall.--explore: opens seed URLs with the active driver and includes bounded browser evidence in discovery.--max-pages <n>: maximum pages to explore when--exploreis set. Defaults to5.--max-depth <n>: same-origin link depth for browser exploration. Defaults to1.--browser <name>: browser engine or channel for browser exploration.--auth-profile <name>: prepares reusable/API auth state for browser-backed exploration and uses the named profile.--auth-mode <mode>: overrides the configured auth mode for browser-backed exploration.--refresh-auth: ignores reusable auth state and creates fresh state where applicable.--output <path>: writes normalized discovery proposal JSON.--inventory-output <path>: writes proposed UI inventory updates when the model returns them.--spec-output <path>: writes proposed flows as reviewable Markdown.--dry-run: prints the proposal summary without writing an artifact.--config <path>: JSON config path.--max-turns <n>: bounds model session turns.