Skip to main content

Migrating from cypress-rails

E2E on Rails is the maintained path for Rails teams that want Cypress or Playwright browser tests with Rails-side test data.

Install the current 1.x gem as cypress-on-rails:

group :test, :development do
gem 'cypress-on-rails', '~> 1.0'
end

Then run the installer for your runner:

bin/rails g cypress_on_rails:install
bin/rails g cypress_on_rails:install --framework playwright

Concept map

cypress-rails conceptE2E on Rails path
Reset endpointGenerated reset/app-command middleware
Cypress-only workflowCypress or Playwright
Test data setupApp commands, scenarios, FactoryBot, fixtures
Browser specsCypress specs or Playwright specs

Migration shape

  1. Add gem 'cypress-on-rails' to the Rails app.
  2. Run the generator.
  3. Move reusable state setup into e2e/app_commands/.
  4. Convert repeated setup flows into Scenarios.
  5. Run the suite through bin/rails cypress:run or bin/rails playwright:run.

For deeper migration planning, see the roadmap docs in this repository and the current Best Practices.