Getting Started

Record your Cypress.io tests

1

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.

Create a cypress team
2

Install the Replay Cypress plugin

Terminal
npm install --save-dev @replayio/cypress
3

Install the Replay browser

Terminal
npx replayio install
4

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.

.env
REPLAY_API_KEY=<your_api_key>
5

Add the plugin to your project

Installing Replay Cypress is as simple as adding the plugin to your cypress.config.js and support files. Once installed, the plugin will let you record your tests with the Replay Chrome browser and add the Cypress timeline to Replay DevTools.

cypress/support/e2e.js
require('@replayio/cypress/support')
cypress.config.js
1const { defineConfig } = require('cypress')
2const { plugin: replayPlugin, wrapOn } = require('@replayio/cypress')
3require('dotenv').config()
4
5module.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 DevTools
11 apiKey: process.env.REPLAY_API_KEY,
12 })
13 return config
14 },
15 },
16})
6

Run Your test

With everything set up, you can now run cypress run to record and upload your first Cypress replays.

Terminal
npx cypress run --browser replay-chromium
Terminal
šŸ•‘ Completing some outstanding work ...
šŸš€ Successfully uploaded 2 recordings:
āŒ cypress/e2e/spec.cy.ts
https://app.replay.io/recording/5bab992d-34dd-4853-9f6a-09375a66de98
āœ… cypress/e2e/clearCart.cy.js
https://app.replay.io/recording/b37abe67-031c-4d23-ba8b-0224fcd3e0d5

Record your test suite in CI

Now that you're ready to inspect your local tests, the next step is to record your tests in CI. Learn how to set up Replay with your Cypress tests on GitHub Actions and other CI providers.

Read more

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