Getting Started
Record your Playwright tests
Create a new Test Suite team
Start by visiting our new test suite form. It will create an API key and guide you through each step.

Install the Replay Playwright plugin
Terminalnpm install --save-dev @replayio/playwright
Install the Replay browser
Terminalnpx replayio install
Save your API key
To use your API key, you can either use dotenv package and save it to a .env file or add the API key to your environment directly.
.envREPLAY_API_KEY=<your_api_key>
Update playwright.config.js
Replay needs two pieces of configuration in playwright.config.ts:
- A
replay-chromiumproject tells Playwright to run tests with the Replay browser. - A
replayReporterentry captures test metadata and uploads recordings to your dashboard.
You need both for the standard recording flow.
playwright.config.ts1import { PlaywrightTestConfig } from "@playwright/test";2import {3 devices as replayDevices,4 replayReporter5} from "@replayio/playwright";6import "dotenv/config";78const config: PlaywrightTestConfig = {9 reporter: [10 replayReporter({11 apiKey: process.env.REPLAY_API_KEY,12 upload: true,13 }),14 ["line"],15 ],16 projects: [17 {18 name: "replay-chromium",19 use: { ...replayDevices["Replay Chromium"] },20 },21 ],22};23export default config;
Record your test
Run Playwright with the Replay project. Recordings upload automatically when the run finishes:
Terminalnpx playwright test --project replay-chromium
Terminal➜ npx playwright test --project replay-chromiumRunning 1 test using 1 worker[1/1] things-app.spec.ts:14:7 › Todos › should allow me to add todo items[replay.io]: 🕑 Completing some outstanding work ...[replay.io]:[replay.io]: 🚀 Successfully uploaded 1 recordings:[replay.io]:[replay.io]: ✅ should allow me to add todo items1 passed (2.1s)
Open your Test Suite Dashboard to confirm the recording appears.
Check out this replay for a detailed walkthrough on debugging a flaky Playwright test.
Adding Replay to an existing Playwright project
If you already have a playwright.config.ts, merge Replay in instead of overwriting it:
- Reporters — Append
replayReporter(...)to your existingreporterarray. Leavehtml,github,line, etc. in place. - Projects — Add the
replay-chromiumproject alongside existing ones. If you do not need a non-Replay run locally, you can keepreplay-chromiumas the only project and remove a duplicate stock Chromium project to avoid running both browsers. - Always pass
--project replay-chromiumwhen you want Replay to record. Without--project, Playwright runs every project in the config—including non-Replay ones, which will not produce recordings.
Troubleshooting
If something does not look right, work through these in order:
- No recording uploaded — Confirm
REPLAY_API_KEYis set in the shell that runs Playwright (echo $REPLAY_API_KEY) and that the run actually used--project replay-chromium. replayReporterwarns "None of the configured projects ran using Replay Chromium" — You ran a different project. Re-run with--project replay-chromium.- Browser fails to launch — Re-run
npx replayio installand verify the install succeeded. The Replay browser is separate from Playwright's bundled Chromium. - The reporter is wired up but recordings still do not appear — Check that
replayReporteris before other reporters that may swallow output (for example, Playwright'slinereporter trims the last log line; keepreplayReporterfirst in the array). - Errors that look like they come from your app (404s, missing assets, dev-server warnings) — These usually indicate an application-side problem, not a Replay issue. Run the same test once with stock Chromium to confirm.
Record your test suite in CI
GitHub Actions is the documented CI path. The minimal workflow installs dependencies, installs the Replay browser, then runs Playwright with REPLAY_API_KEY set:
.github/workflows/e2e.ymlname: End-to-end testson:pull_request:push:branches: [main]jobs:e2e-tests:runs-on: ubuntu-22.04steps:- uses: actions/checkout@v4- run: npm ci- name: Install Replay Chromiumrun: npx replayio install- name: Run Playwright testsrun: npx playwright test --project replay-chromiumenv:REPLAY_API_KEY: ${{ secrets.REPLAY_API_KEY }}
Add REPLAY_API_KEY to your repository secrets. For deeper CI guidance—including how to merge Replay into an existing workflow and how to control which recordings upload—see the GitHub Actions reference. Other CI providers follow the same pattern; see other CI providers. To tune what gets uploaded (failed-only, branch-based, deduplicated), see Upload strategies.
Learn how to record your tests, manage your test suite and debug flaky tests using Replay DevTools
Record Your CI Test Run
Learn how to integrate Replay into your Continuous integration service
Replay DevTools
Learn how to use Replay DevTools to debug your tests.
Test Suite Management
Test Suite Dashboard helps you stay on top of your test suite health.
Debugging tips
Learn about how to effectively debug flaky or failing tests