Welcome to Replayβs Cypress plugin documentation!
This guide assumes that you already have a Cypress 10.9+ test suite. If youβre just setting up your Cypress test suite, first follow the instructions here. If your Cypress Test Suite is below 10.9, follow the instructions here.
Installing the Replay plugin (Cypress v10.9+)
Install the
@replayio/cypress
package in your project:bashnpm install @replayio/cypress -D # or yarn add @replayio/cypress --dev
Add the Replay plugin to
cypress.config.js
javascriptconst { defineConfig } = require('cypress'); // πββοΈ Add this line to require the replay plugin const replay = require("@replayio/cypress") module.exports = defineConfig({ e2e: { setupNodeEvents(on, config) { // πββοΈ Add this line to install the replay plugin replay.default(on, config); return config; }, }, });
Add this line your support file, which should be
cypress/support/e2e.js
for e2e tests (unless modified)javascript// cypress/support/e2e.js require('@replayio/cypress/support');
After the setup is complete, you can now try running your tests locally with the Replay browser:
bashnpx cypress run --browser="Replay Firefox"
Replay Chromium is only available for linux, but we hope to ship Chromium for Mac and Windows soon!
If you run into any problems, consult our troubleshooting guide here.
β‘οΈ Step 2: Recording and uploading tests in CI
Troubleshooting GuideRecording and Uploading your CI replaysCypress FAQ