logo

Recording Automated Tests

With Replay, you can record automated test with Playwright and Puppeteer to generate replays. These are super helpful for debugging failed tests because the replay captures the entire browser session with no need to reproduce the failure.
πŸ’‘
There is also an experimental version of Replay for Cypress. Check out the repository here for more details.

Recording tests with Replay

Check out our guides for Playwright and Puppeteer below.
🎭Recording Playwright (beta)πŸ‘ΆRecording Puppeteer (beta)πŸƒRecording Jest

Viewing and uploading replays

After you've recorded a test using the instructions above, you will need to use the Replay CLI to upload and view replays. If you’re recording with Playwright, you can use our GitHub Action to upload failure replays automatically.
πŸ‘‰
An API key is required to view and upload recorded replays. Personal API keys are limited to 10 recordings, but you can record more by setting up a team.
You can upload a recording with the npx @replayio/replay command. The most common usage is to run view-latest to upload and view the most recent replay.
bash
RECORD_REPLAY_API_KEY=123 npx @replayio/replay view-latest
You can also upload individual replays with the CLI as well. The ls command lists the recordings so you can identify the id needed to pass to the upload command.
shell
npx @replayio/replay ls npx @replayio/replay upload <id>
Uploading older replays with the CLI
Once uploaded, you can view and share the replay like you normally would.
πŸ’‘
It is a good idea to clear recordings on your local disk periodically once uploaded.

Was this page helpful?