CI Workflows

Recording strategies

Depending on what problem you’re trying to solve, there are two primary ways of using Replay.


Record failures on PRs

This is useful for debugging failing tests in pull requests. It only records failing tests so there’s minimal overhead, and those replays will be available for debugging immediately after tests finish.

Run your tests and pass the mode record-on-retry .

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

Record all on merge to master

This is useful for busting flakes. It only records failing tests so there’s minimal overhead, and those replays will be available for debugging immediately after tests finish.

Run your tests as usual, but set the trigger to only run on merge to master.

Upload strategies

You have the flexibility to choose not only when to record but also when to upload your recordings. For details on various uploading strategies, see the documentation.