Write Cypress Tests in Natural Language with cy.prompt()

You have seen the preview. You have heard the discussion. And now it’s official: cy.prompt() is live and available to everyone As an experimental facility. announced live on stage CyprusConf 2025 By founder Brian Mann, the introduction of cy.prompt() into the Cypress API is the first step into the future of AI-assisted testing.

Update: A recording of Brian Mann’s CypressConf 2025 talk is now available.


Problem

Modern AI promises to make test automation easier, but so far, the reality has often fallen short. Many AI-based testing tools were not built with testing in mind. They often assume app behavior, generate scripts without evaluating them in a live browser, and hide the intent of testing behind opaque layers. This can lead to lag, slow execution, and poor debuggability, especially when the AI ​​becomes the arbiter of correctness rather than the test writer. With Cy.prompt(), Cyprus takes a different approach Putting AI straight into your Cyprus workflow In a way it is fast, reliable and transparent.

Write tests in natural language in seconds

With Cy.prompt(), you can go from an idea to running testing in seconds by describing the user journey in simple language.

cy.prompt([
  "Visit https://aicotravel.co",
  "Type 'Paris' in the destination field",
  "Click on the first search result",
  "Select 4 days from the duration dropdown",
  "Press the **Create Itinerary** button"
])

Each step is translated into actual Cypress commands such as cy.visit(), cy.get(), and cy.click(), and executed in the browser with full visibility into the command log.

This is not just a convenience feature. It’s a new way of thinking about test creation that bridges the gap between the coverage you need and the code that runs it. (without rapid increase in capacity),

The best part is that it is designed to be fast, flexible, and responsive to changes in your application. This means you’re not paying a huge performance penalty for natural language features. Your tests are still running with the same speed and reliability you expect from Cyprus.

Unlike some AI testing tools that require separate plugins or external applications, cy.prompt() is built directly into the Cypress app you use every day. Once you’re on Cypress v15.4.0, you can get started by adding the experimental flag to your Cypress configuration and signing in to your Cypress Cloud account within the app.

const { defineConfig } = require('cypress')

module.exports = defineConfig({
 e2e: {
   experimentalPromptCommand: true,
 },
})

There’s no new framework to learn, no additional services to integrate, and no context-switching. You write your tests in the same Cypress testing environment, just with a new superpower you have.

A shared language of quality

One of the most exciting aspects of Cy.prompt() is how it opens up test automation to a much broader audience. You no longer need deep JavaScript or Cypress expertise to write meaningful tests. If you understand the user journey, you can turn it into an automated test case.

Think about the possibilities: A product manager could write acceptance criteria for a new feature, and that description could go straight into Cypress testing. This is like writing your BDD-style gave/when/then scenarios directly into the test suite. In fact, cy.prompt() lets you use BDD-style or Gherkin-like statements as test steps, aligning everyone from engineers to stakeholders on the behavior being verified.

By lowering the barrier to automation, cy.prompt() turns testing into a team sport. QA specialist, product owner, support engineer – anyone who knows the feature can help write tests for it. This not only increases coverage (more perspectives = more scenarios covered) but also promotes collaboration.

The speed of AI with the peace of mind of human governance

A key design principle of Cyprus’ approach to AI is to put you in the driver’s seat. With Cy.prompt(), you always have the ability to see what’s happening in your tests. Each quick step appears in the Cypress command log, and you can click or hover over it to inspect exactly what happened at each step of the test run. There’s no mysterious “black box” doing magic in the background, you can see every selector it makes and every action it takes, as if you wrote the code yourself.

Most importantly, you can retrieve the code that was generated by cy.prompt() whenever you want. Cypress offers the option to extract the generated test steps into a regular test script that you can edit, commit, and maintain like any other code.

You decide how to use AI in your workflow. If you prefer to take advantage of cy.prompt() just to promote test authoring, you can strip out the code. If you want to realize the full power of the command, you can do your test code with cy.prompt() and realize self-healing at run time. This empowers your team to leverage AI-assisted testing that fits neatly into established processes, without loss of trust or traceability.

Self-healing test, low maintenance

We’ve all experienced the pain of brittle tests that break with the slightest UI change. These false failures reduce confidence in your test suite over time. cy.prompt() tackles this problem by introducing self-healing capabilities that make tests more resilient to front-end changes.

When Cypress generates the steps from your prompt, it doesn’t rely on static selectors alone. Instead, it uses AI to understand the intent of each action and detect elements in a more adaptive way. Cypress can automatically update selectors if your markup changes, no manual editing required.

This results in a significant reduction in test maintenance, freeing you up to focus on new testing and building features. And because this self-healing runs with full visibility, every adjustment is shown in the command log. It’s like a smart assistant that says, “I couldn’t find the login button by the old selector, but I saw a new one that matches the description, so I clicked on that.”

This makes your tests more robust without compromising clarity or confidence. Rather than gloss over the issues, they avoid false negatives while staying true to the user flow you describe. For large CI test suites, the effect is game-changing: fewer broken builds, less manual triage, and a more stable delivery pipeline.

AI-powered flexibility you can count on

With Cy.prompt(), Cypress is not only generating tests, it is making them smarter and more flexible. Tests written in natural language capture the high-level intent of what should happen. Cypress uses that intent to keep the test on track, even when the underlying UI changes.

This adaptability gives cy.prompt() the edge in reliability. Tests can recover gracefully from changes that would normally break a rigid script. Cyprus’ approach is based on collaboration between AI and testers. AI handles the difficult parts (Finding elements, adjusting minor changes, suggesting selectors) When you guide intention and verify results.

If any real problems emerge, such as regression or unexpected behavior, your test fails as it should. But for accidental changes, Cypress helps to make the test pass without rewriting the code.

This kind of AI-powered stability means teams can move forward faster with confidence. When tests are easy to write and built for optimization, you can cover more ground in less time and trust that green test results reflect real app quality, not lucky escapes or brittle paths.


We believe cy.prompt() is a huge leap forward in the way teams approach end-to-end testing. By combining Cypress’s renowned reliability with the flexibility of AI and natural language, together we are enabling faster authoring, broader participation, and robust testing. cy.prompt() is now available as a public experimental feature. Its use is free during this experimental phase. All you need is a Cypress Cloud account (even the free tier). Signing up gets you a free trial of our full enterprise feature set, so while you’re there, find out how Cypress Cloud can support the rest of your testing workflow.

See our documentation for full details on how cy.prompt() works and how to enable it.

Brian Mann also gave a first look at our next step in AI-assisted testing, Studio AIDuring his CypressConf founder session. If you’re interested in early access, sign up here.



Leave a Comment