Skip to main content
By the end of this guide, two of your existing Playwright tests run against production every ten minutes from two regions, and you have seen what a failure looks like before a real one happens.
The Shop critical flows Playwright Check Suite in Checkly, passing from two locations
No Playwright project handy? Clone the sample project this guide is built on. It runs against the Danube demo shop.
To run this guide from your terminal or your coding agent, run npx checkly init in your project first. It installs the Checkly CLI and Checkly Skills for your agent. Then paste the prompt below into Claude Code, Cursor, Codex, or any agent that supports skills. It builds the same setup as this guide, proves it with npx checkly test --record, and stops for your confirmation before npx checkly deploy.
Prompt
Every step below is what the agent just did, in the open, so you can read the result or do it by hand.

Step 1: Pick the tests that become monitors

Not every test belongs in production monitoring. The sample has three: a search, a checkout, and a signup. Signup creates accounts, so it stays in CI. Search and checkout are what you want to know about within minutes, so they get a @monitor tag.
tests/checkout.spec.ts
Then give the tagged tests their own Playwright project. Checkly sets CHECKLY=1 on every run, which is the one switch you need to point monitoring at production while local runs keep using your dev server.
playwright.config.ts
Three settings matter for monitoring and not for testing. baseURL makes the same page.goto('/') hit production on Checkly. maxFailures: 1 stops the run at the first failure so the alert goes out sooner. retries absorbs a transient network blip before it becomes an alert. Checkly records a trace on every run regardless of your trace setting.
If your config starts a webServer, guard it the same way: webServer: onCheckly ? undefined : { ... }. On Checkly the deployed site is already running.

Step 2: Define the monitor

Install the CLI if this repository does not have it yet, then describe the monitor in a checkly.config.ts next to your Playwright config.
Terminal
A Playwright Check Suite reuses your Playwright config and runs a whole project. A Browser Check runs a single spec file with Checkly’s own Playwright setup. Pick one.
The Check Suite path needs nothing else: the pwProjects entry selects the monitoring project, and the suite runs every ten minutes from Virginia and Ireland. The Browser Check path needs a copy of the spec with page.goto('https://danube-web.shop/'), because there is no playwright.config.ts to supply baseURL. The sample keeps that copy in checks/checkout.spec.ts.
Prefer to have your coding agent write this file? The Playwright Check Suite quickstart has a prompt that inspects your Playwright config and generates the checkly.config.ts.

Step 3: Run it on Checkly before you deploy

npx checkly test bundles the project, runs it on Checkly’s infrastructure, and streams the result back. --record keeps the run so you can open it in the app.
Terminal
Terminal
Both variants from step 2 ran because the sample contains both. Open the session link. Each test in the suite shows its steps, timing, a trace, and a video, the same artifacts you get from a local run.
A passing Shop critical flows result in Checkly listing the checkout and search test cases with trace and video attachments

Step 4: Deploy

Terminal
Terminal
The suite now runs on its schedule. The first run starts immediately with CHECKLY_RUN_SOURCE=CLI_DEPLOY, then every ten minutes from both locations. It appears in your check list as a Playwright check.
The Checkly check list showing the Shop critical flows Playwright check with its locations and pass rate
Every later npx checkly deploy updates the suite in place, so the monitor changes whenever the tests do. Wire that into CI and the tests and the monitors ship together.

Verify it works

Break the checkout on purpose before production does. Rename the Buy button in the spec to Purchase and run the suite again, without deploying.
Terminal
Terminal
Playwright retried the test twice, the search test still passed, and maxFailures stopped the run. The result page shows the failing step, the error, a screenshot at the moment of failure, and the trace. This is the page an alert links to.
The failed checkout test case in Checkly showing three failed attempts, the Playwright error with the failing line highlighted, and View Trace and Analyze root cause buttons
Put Buy back. The deployed monitor never saw the broken version, because npx checkly test runs the code in your working tree and npx checkly deploy is what changes the monitor.
--grep matches the check’s name, not its logicalId.

Next

Cover every endpoint with uptime monitors: add URL, heartbeat, and SSL monitors around the flows you just covered, from a few lines of code.

Reference