SDODS
Guides

Migrating from Playwright, Cypress and Cucumber

Bring existing suites into SDODS without rewriting everything on day one.

What you'll learn

What to keep, what to convert, and in which order, when you come from plain Playwright, Cypress or a Cucumber-based framework.

From Playwright

  1. Point sdods analyze <dir> --apply at the existing suite. It copies the specs into projects/<slug>/recorded/imported/ and they run as the recorded layer immediately. Pass --no-import-specs to scaffold the project without copying them.
  2. Move base URLs and credentials into envs/<env>.yaml and .env.<env>.
  3. Convert high-value flows with sdods record convert <spec> so they become tagged features with shared steps.
  4. Turn page.locator('css') calls into heal.locator(primary, context) in page objects as you touch them.

From Cypress

  1. Run sdods analyze to detect routes, the test-id attribute (data-cy is recognised) and existing specs.
  2. Port custom commands to steps in the shared vocabulary or to page-object methods.
  3. Replace cy.intercept fixtures with the mock step or HAR files.
  4. Keep data-cy as testIdAttribute so locators keep working.

From Cucumber frameworks

For a Cucumber-JS suite, let SDODS do the first pass:

sdods import cucumber ../old-suite -p shop --dry-run   # the report, nothing written
sdods import cucumber ../old-suite -p shop             # a proposal holding the whole project
sdods proposals show <id> && sdods proposals accept <id>
sdods lint -p shop

It reads the features, the step definitions and cucumber.js as text (nothing from the old suite is executed), copies the features into features/imported/, gives each scenario one layer tag (inferred from whether its step definitions use a browser or an HTTP client) and one suite tag, declares the suite's other tags under tags.extra, reuses SDODS library steps where the wording matches, and writes the rest as stubs in steps/imported.steps.ts that fail with not ported yet until you port them. IMPORT-REPORT.md lists every scenario's tags, the stubs, steps with no definition, and the hooks and World code to port by hand. The design is in docs/adr/0001-import-existing-suites.md. sdods import playwright <dir> analyses a Playwright suite and proposes the report only.

By hand, or for other Cucumber frameworks:

  1. Copy .feature files into features/<module>/; add the layer and suite tags; sdods lint --fix-tags handles obvious folders.
  2. Map step definitions: most HTTP and navigation steps already exist in the shared library; keep the rest in steps/*.steps.ts using the project test from steps/fixtures.ts.
  3. Replace world state with the apiContext variables and dataset rows.
  4. Replace separate UI and API runners with one sdods run.

Do the migration per module and let the coverage report show what is still uncovered.

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 https://sdods.com/skills.git
  2. /plugin install sdods@sdods
Learn more about using SDODS with AI tools

On this page