SDODS
Guides

Record and playback

Record a browser session, run it as a spec, and convert it to Gherkin with review.

What you'll learn

How sdods record wraps the session recorder with your project's environment, test-id attribute and a logged-in pool user, what post-processing does, how recorded specs run, and how conversion to features stays reviewable.

The flow

Record

bun run sdods record -p demo-shop -e staging --name checkout --user standard
bun run sdods record -p demo-shop -e staging --name mobile-checkout --device "iPhone 15"
bun run sdods record -p demo-shop -e staging --name api-capture --save-har

Under the hood SDODS starts the recorder with the environment's base URL, the project's test-id attribute, the leased user's storage state, and the device, locale, timezone, geolocation and color-scheme options from the environment. Only public, supported recorder surfaces are used; nothing private is called.

Post-processing

The generated spec is rewritten so it fits the project:

  • imports test and expect from @sdods/core/test, so fixtures, screenshots and healing apply
  • absolute URLs on the environment origin become relative routes
  • the test is wrapped in test.describe with @recorded @ui @regression tags
  • a header comment records project, environment, user, device and runner version
  • CSS and XPath locators are flagged // sdods:fragile for the reviewer

--no-post-process keeps the raw output.

Run recorded specs

bun run sdods run -p demo-shop -e staging -l recorded -b chromium

recorded is a layer like the others; results ingest through the runner's JSON reporter.

Convert to Gherkin

bun run sdods record convert projects/demo-shop/recorded/checkout.spec.ts
bun run sdods proposals list
bun run sdods proposals accept <id>

The generator agent reuses existing steps first, adds steps only for unmatched actions, and never deletes the spec. See Agents.

Next steps

Using an AI coding agent? Install SDODS:

Install the SDODS plugin in Claude Code: skills, subagents, commands and the MCP server.

  1. /plugin marketplace add YarlisAISolutions/sdods-skills
  2. /plugin install sdods@sdods
Learn more about using SDODS with AI tools

On this page