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 (Experimental)Recording Jest (Experimental)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. bashRECORD_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.shellnpx @replayio/replay ls npx @replayio/replay upload <id>
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.
Running your Automated Tests
We provide two GitHub actions to help run your automated tests and upload them to replay:
replayio/action-playwright
runs Playwright tests, uploads replays, and comments on the original PR with links to replays
replayio/action-upload
uploads replays and can be used alongside other test runners