Record your Cypress.io tests
Create a new Test Suite team
Start by visiting our new test suite form. It will create an API key and guide you through each step.

Install the Replay Cypress plugin
Terminalnpm install --save-dev @replayio/cypress
Install the Replay browser
Terminalnpx replayio install
Save your API key
To use your API key, you can either use dotenv package and save it to a .env file or add the API key to your environment directly.
.envREPLAY_API_KEY=<your_api_key>
Add the plugin to your project
Replay needs two edits to your project:
cypress.config.js— AddreplayPlugininsidesetupNodeEvents. The plugin registers the Replay Chromium browser and uploads recordings.cypress/support/e2e.js— Import@replayio/cypress/supportso Cypress commands and assertions appear in the Replay DevTools timeline.
You need both for the standard recording flow.
cypress/support/e2e.jsrequire('@replayio/cypress/support')
cypress.config.js1const { defineConfig } = require('cypress')2const { plugin: replayPlugin, wrapOn } = require('@replayio/cypress')3require('dotenv').config()45module.exports = defineConfig({6 e2e: {7 setupNodeEvents(cyOn, config) {8 const on = wrapOn(cyOn)9 replayPlugin(on, config, {10 upload: true, // automatically upload your replays do DevTools11 apiKey: process.env.REPLAY_API_KEY,12 })13 return config14 },15 },16})
Run your test
Run Cypress with the Replay browser. Recordings upload automatically when the run finishes:
Terminalnpx cypress run --browser replay-chromium
Terminal🕑 Completing some outstanding work ...🚀 Successfully uploaded 2 recordings:❌ cypress/e2e/spec.cy.tshttps://app.replay.io/recording/5bab992d-34dd-4853-9f6a-09375a66de98✅ cypress/e2e/clearCart.cy.jshttps://app.replay.io/recording/b37abe67-031c-4d23-ba8b-0224fcd3e0d5
Open your Test Suite Dashboard to confirm the recordings appear.
Adding Replay to an existing Cypress project
If you already have a cypress.config.js with custom setupNodeEvents, merge Replay in instead of overwriting it:
- Wrap your existing
on— Replaceonin yoursetupNodeEventssignature withcyOn, then callconst on = wrapOn(cyOn). Pass that wrappedonto both your existing event handlers andreplayPlugin. WithoutwrapOn, Replay cannot hook into Cypress's lifecycle events. - Return the
configobject —setupNodeEventsmustreturn config(or a Promise resolving to it). Forgetting this is the most common cause of "browser not found" errors. - Keep existing
cypress/support/e2e.jscontent — Addrequire('@replayio/cypress/support')(orimport '@replayio/cypress/support') alongside whatever else is in your support file. - Pass
--browser replay-chromiumwhen you want Replay to record. Cypress will keep using your default browser otherwise.
Troubleshooting
If something does not look right, work through these in order:
- No recording uploaded — Confirm
REPLAY_API_KEYis set in the shell that runs Cypress (echo $REPLAY_API_KEY) and that the run used--browser replay-chromium. Browser: Replay Chromium was not found— YoursetupNodeEventslikely is not returningconfig, or the support file import is missing. If both look right, see the Cypress troubleshooting guide for the full list of causes (caching,CYPRESS_INSTALL_BINARY, OS support).- Tests run but Cypress commands do not appear in Replay DevTools — The support file import is missing or
wrapOnis not wrapping theonyou pass to your existing handlers. - Browser launches but does not record — On older Ubuntu runners, OpenSSL 1.1 may be missing. See the Cypress troubleshooting guide for the install snippet.
- Errors that look like they come from your app — These usually indicate an application-side problem, not a Replay issue. Run the same test once with stock Chrome (
--browser chrome) to confirm.
For deeper issues (browser hangs, diagnostic mode, verbose logs), see the full Cypress troubleshooting guide.
Record your test suite in CI
GitHub Actions is the documented CI path. The minimal workflow installs the Replay browser, then uses cypress-io/github-action with the Replay browser and REPLAY_API_KEY set:
.github/workflows/e2e.ymlname: End-to-end testson:pull_request:push:branches: [main]jobs:cypress-run:runs-on: ubuntu-22.04steps:- uses: actions/checkout@v4- name: Install Replay Chromiumrun: npx replayio install- name: Cypress runuses: cypress-io/github-action@v6with:browser: replay-chromiumenv:REPLAY_API_KEY: ${{ secrets.REPLAY_API_KEY }}
Add REPLAY_API_KEY to your repository secrets. For deeper CI guidance, see the GitHub Actions reference. Other CI providers follow the same pattern; see other CI providers. To tune what gets uploaded (failed-only, branch-based), see Upload strategies.
Learn how to record your tests, manage your test suite and debug flaky tests using Replay DevTools
Record Your CI Test Run
Learn how to integrate Replay into your Continuous integration service
Replay DevTools
Learn how to use Replay DevTools to debug your tests.
Test Suite Management
Test Suite Dashboard helps you stay on top of your test suite health.
Debugging tips
Learn about how to effectively debug flaky or failing tests