<aside> πŸ’‘

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.

</aside>

Step 1: Installing the Replay plugin

Install the @replayio/cypress package in your project:

npm install @replayio/cypress -D

Add the Replay plugin to cypress.config.js

const { defineConfig } = require('cypress');
// πŸ™‹β€β™‚οΈ Add this line to require the replay plugin
const { plugin: replayPlugin } = require("@replayio/cypress")

module.exports = defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      // πŸ™‹β€β™‚οΈ Add this line to install the replay plugin
      replayPlugin(on, config);
      // Make sure that setupNodeEvents returns config
      return config;
    },
  },
});

Add this line your support file, which should be cypress/support/e2e.js for e2e tests (unless modified)

// 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:

npx cypress run --browser=replay-chromium

<aside> 🚧 Replay Chromium is GA on Linux and beta for Mac and Windows!

</aside>

<aside> ⚠️ If you run into any problems, consult our troubleshooting guide here.

</aside>