CI Workflows
Upload strategies
When you run tests and create recordings, they are stored locally. You can opt to upload them automatically or define your own uploading strategy. All uploaded recordings become accessible in the Replay App.
While uploading just failed test is good for saving resources, our recommendation is to upload both failed and passed tests so that you can compare them. This can be really useful for debugging purposes.
Upload failed tests only
By default, all test replays are uploaded no matter the result. If you want upload only the failed recordings, you can define the step to do so using filter
property:
Using GitHub Action
.github/workflows/e2e.yml
1name: Replay tests2on: [push, pull_request]3jobs:4 cypress-run:5 runs-on: ubuntu-22.046 steps:7 - name: Checkout8 uses: actions/checkout@v49 - name: Install dependencies10 run: npm ci11 - name: Run Playwright tests with Replay Browser12 run: npx playwright test --project replay-chromium --reporter=@replayio/playwright/reporter,line13 - name: Upload replays14 if: ${{ always() }}15 uses: replayio/action-upload@v0.5.116 with:17 api-key: ${{ secrets.REPLAY_API_KEY }}18 filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }}