Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@replayio/cypress

Package Overview
Dependencies
Maintainers
9
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@replayio/cypress

Plugin to record your Cypress tests with Replay

  • 3.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.5K
decreased by-21.88%
Maintainers
9
Weekly downloads
 
Created
Source

@replayio/cypress

Plugin to record your Cypress tests with Replay

Check out the "Recording Automated Tests Guide" to get started.

Use with action-cypress to automatically upload replays of failed tests.

Installation

npm i @replayio/cypress

Configuration

The Replay adapter for cypress requires two updates: one to your cypress.config.js and one to your support file in cypress/e2e/support.js.

// cypress.config.js
import { defineConfig } from "cypress";
import cypressReplay, { wrapOn } from "@replayio/cypress";

module.exports = defineConfig({
  e2e: {
    setupNodeEvents(cyOn, config) {
      const on = wrapOn(cyOn);
      // Adds replay-chromium browsers
      // and hooks into Cypress lifecycle methods to capture test
      // metadata and results
      cypressReplay(on, config);
      return config;
    },
  },
});
// cypress/e2e/support.js

import "@replayio/cypress/support";

Runtime Configuration

  • Use the --browser flag to select the Replay Chromium to record
  • To enable capturing metadata for the tests, you must set RECORD_REPLAY_METADATA_FILE to an accessible file path.
  • To hide the Cypress sidebar and only show your application, set CYPRESS_NO_COMMAND_LOG.
RECORD_REPLAY_METADATA_FILE=$(mktemp) \
npx cypress run --browser replay-chromium

Parallel runs on CI

If you have a large test suite, you might choose to split your test suite up and run them in parallel across multiple machines but still treat them as a single suite. By default, @replayio/cypress will generate a UUID for the suite and store it in the recording metadata under test.run.id but in this case each machine will have its own id.

In order to link these independently ran tests together, you can generate your own UUID and set it in the RECORD_REPLAY_TEST_RUN_ID environment variable and it will be used instead of generating a value.

FAQs

Package last updated on 12 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc