Configuration

There are different modes and strategies that help you create your recordings more effectively. By default, every test is recorded, but you can choose to create your recordings only when problems appear, saving costs and time.


Diagnostic Modes

The @replayio/cypress plugin includes a Cypress runner that includes diagnostic modes to help identify issues with the Replay browsers. Internally, the plugin uses Cypress’s module API to invoke Cypress multiple times with different environment variables to adjust the behavior of the Replay browser.

Terminal
npx @replayio/cypress run --mode [mode] [...other cypress parameters]

Record on Retry

Runs the test suite once with recording disabled and if any specs fail, those are re-ran with recording enabled.

Terminal
npx @replayio/cypress run --mode record-on-retry

Stress

Runs the test suite 10 times regardless of test result. This mode is useful for diagnosing tests that have a low flakiness rate and are hard to reproduce locally.

Terminal
npx @replayio/cypress run --mode stress

Diagnostics

Terminal
npx @replayio/cypress run --mode diagnostics --level basic

--level basic

When level is set to basic, the test suite is ran 3 times:

  1. Recording disabled
  2. Recording enabled
  3. Recording enabled with debug assertions disabled

--level full

When level is set to full, the test suite is run many times with each run disabling a different browser feature.

Terminal
npx @replayio/cypress run --mode diagnostics --level full --spec cypress/e2e/failing-spec.ts

This mode is mostly used for diagnosing problems with integration of Replay into your test run. Due to the number of runs (currently 38), we don’t recommend using the --level full flag for standard test runs. Be sure to limit using this mode to a specific spec file that is failing by using --spec [path to spec].