Is there a code generator for Cypress testing tool

There is a built-in recorder inside the Cypress Support Pro plugin for IntelliJ platform (IDEA, Webstorm etc.) It allows recording UI action inside the Cypress Runner and insert the generated code directly to your case in IDE. Also, recorder has pluggable architecture that make it easy to extend or replace code-generation logic. By default, it uses the scripts from KabaLabs / Cypress-Recorder.

Here is a brief video overview of recorder: https://www.youtube.com/watch?v=FgnHYwmguFI You can try plugin for free here: https://plugins.jetbrains.com/plugin/13987-cypress-support-pro (or just install it via settings -> plugins menu in IDE)

Self-promotion disclosure: I'm the author of this paid plugin.


Yes, it looks like there is a good attempt to create a scenario recorder and it works to a great extent:

https://chrome.google.com/webstore/detail/cypress-scenario-recorder/fmpgoobcionmfneadjapdabmjfkmfekb/related?hl=en


2021 Update

There have been generators available for a while that the other answers mention. I originally answered this in August 2018, at which time there were no generators available. I still stand by my advice below.

Original answer

To answer your question:

No

To provide you unsolicited advice:

Testing a huge flow throughout your front end is an anti-pattern in Cypress. They (and I) recommend breaking that up into a spec for each page, then only add small tests to that spec for the actions that you perform on that page. You will also want to mock, stub, or otherwise programmatically set up and tear down the required state for that spec to run.

See this page and watch the linked YouTube video to get a better idea. https://docs.cypress.io/guides/references/best-practices.html#Organizing-Tests-Logging-In-Controlling-State

I have a long history of using selenium with page objects and workflows. I fought this idea for a while when I started using Cypress but have drank the kool-aid and find it is MUCH better this way.


There is a new Cypress Recorder extension (different from the one posted above) that we have created that we feel may be closer to what you are asking for than the previously posted one above.

https://chrome.google.com/webstore/detail/cypress-recorder/glcapdcacdfkokcmicllhcjigeodacab

Please feel free to let us know what you think.