Getting Started
Record your Playwright tests
Create a new testsuite team
Start by visiting our new testsuite form. It will create an API key and guide you through each step.
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.
.env
REPLAY_API_KEY=<your_api_key>
Update your configuration
playwright.config.ts
1import { PlaywrightTestConfig, devices } from "@playwright/test";2import { devices as replayDevices, replayReporter } from "@replayio/playwright";3import "dotenv/config";45const config: PlaywrightTestConfig = {6 reporter: [7 replayReporter({8 apiKey: process.env.REPLAY_API_KEY,9 upload: true,10 }),11 ["line"],12 ],13 projects: [14 {15 name: "replay-chromium",16 use: { ...replayDevices["Replay Chromium"] },17 },18 ],19};20export default config;
Record your test
Once you have added Chromium Replay Browser to your project, you are ready to create your recordings. You can run your tests normally, using npx playwright test
command.
If your project has multiple browsers set up, you can run Replay Browser only:
Terminal
npx playwright test --project replay-chromium
Terminal
➜ npx playwright testRunning 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)
Check out this replay for a detailed walkthrough on debugging a flaky Playwright test.
Record your tests in CI
Now that you're ready to inspect your local tests, the next step is to record your tests in CI. Learn how to set up Replay with your Playwright tests on GitHub Actions and other CI providers.
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