Autonomy Docs
Migrate

Cypress

Turn each Cypress test into one Autonomy test case of outcome steps, without its cy.get chains, intercepts and custom commands.

Cypress suites carry a lot of framework weight: cy.get chains, cy.intercept aliases and Cypress.Commands.add helpers. None of it carries over. What carries over is what each test proves.

Prompt

Paste this into a coding agent connected to the Autonomy MCP server, from inside the repository:

Codetext
Migrate the Cypress tests in this repository to Autonomy with the Autonomy MCP tools.

Setup
1. Call autonomy_project_list and ask me which project to use. Call autonomy_environment_list with its projectId and ask me which environment to run in.
2. Call autonomy_test_case_list with the projectId. Skip tests that an existing test case already covers.

For each test
3. Create ONE test case with autonomy_test_case_create: projectId, name = the it() title, platforms = ["web"].
4. Write each step as an outcome: what is true when the step is done, in plain words ("A new account exists for a fresh email"). Say what the test proves, not how: no clicks, selectors, waits, retries or should calls. One step can cover several actions that serve one outcome. Use 12 steps or fewer; split a longer test into several test cases.
5. Each step is {id, text, attachments[]}. Each attachment has id, kind and exact. Kinds: account {role}, inbox (no address = a fresh inbox per run), phone, file, screenshot, data {label, value} or {label, intent} for generated data.
6. Never write a password, token or key into a step. For each account the suite signs in as (cy.login, cy.session, fixtures), ask me to save it in the dashboard (the project's Sign-ins, New sign-in) and tell you its account name, then start the test with a step such as "The store owner is signed in" with that account attached. For other secrets in Cypress.env, propose names and reference them as {{env.NAME}}; add them as secret values with autonomy_environment_upsert only after I agree.
7. Values the test is about (the text or number a should checks, a coupon that must apply, input that must be refused): a data attachment with exact: true. Other config: {{env.NAME}}.
8. Sign-up data (emails, names, passwords, random suffixes): a fresh inbox and generated data, never a fixed value.
9. Inline every custom command from cypress/support into what the test proves. Drop cy.intercept stubs: runs test the real product. If a test only works with stubbed responses, don't migrate it; list it instead. Turn cy.wait('@alias') checks into an outcome about what the user sees.

Afterwards
10. If the suite groups tests (describe and context blocks, spec folders, tags), offer to create a test plan per group with autonomy_test_plan_create.
11. Run one migrated test case with autonomy_run_trigger in the environment I picked. Follow it with autonomy_run_get (pass the last cursor and waitMs) until it ends. For any step that didn't pass, read autonomy_run_step_actions and tell me what happened.
12. Finish with a table: source test, test case ID, number of steps, and anything you couldn't map.

Mapping

CypressAutonomy
it()One test case.
describe(), context(), spec foldersOptionally, a test plan.
cy.visit, cy.get(...).click(), type(), data-cy hooksFolded into the step's outcome. The agent finds the controls.
should("contain", "Order placed")The outcome, with Order placed as a data attachment marked Exact.
cy.wait(ms), retries, timeoutsDropped.
cy.login(), cy.session()A signed-in step with a saved sign-in attached as an account.
Custom commandsFolded into the outcomes of the tests that call them.
cy.fixture() dataExact data when the test checks it, otherwise test data or {{env.NAME}}. Credentials become sign-ins.
Cypress.env("X"){{env.X}}, marked secret when it's a credential.
baseUrlThe environment's Web target.
selectFile()A file attachment from the project's Files.
cy.screenshot()A screenshot attachment.
cy.intercept() stubsNot migrated. Runs use the real product.
cy.wait("@alias") checksAn outcome about the result. The run keeps every request in its Network tab.
cy.request() API testsA test case on the API platform. See API and network.

See the migration overview for a worked example.

Didn’t find it?

On this page