Getting Started
Record your Cypress.io tests
Install the Cypress Plugin
Install the Cypress plugin in your project:
Terminal
npm install @replayio/cypress -D
Integrate The Plugin To Your Project
Simply add the Replay plugin to your project configuration and support files.
cypress/support/e2e.js
require('@replayio/cypress/support')
cypress.config.js
1const { defineConfig } = require('cypress')2const { plugin: replayPlugin } = require('@replayio/cypress')3require('dotenv').config()45module.exports = defineConfig({6 e2e: {7 setupNodeEvents(on, config) {8 replayPlugin(on, config, {9 upload: true, // automatically upload your replays do DevTools10 apiKey: process.env.REPLAY_API_KEY,11 })12 return config13 },14 },15})
Generate and save your API key
In order to upload your test replays you need to generate an API key and save it to your environment. You can generate an API key once you created a team in Replay App. API key management section can be found in the team settings menu. Read more about API keys here.
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.
.env
REPLAY_API_KEY=<your_api_key>
Run Your Test With Replay Browser
With everything set up, you can now run your test locally:
Terminal
npx cypress run --browser replay-chromium
After your test finishes it will generate a link to Replay DevTools where you can inspect your test run.
Done!
You’re ready to inspect your local test run in Replay DevTools now. You can also record your tests in your CI environment. Learn how to set up Replay with your Cypress tests on GitHub Actions and other CI providers.
Check out this replay for a detailed walkthrough on debugging a flaky Cypress test. You'll see the capabilities of Replay DevTools and walk through the debugging process of identifying the root cause.
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