Skip to main content
Turn your Playwright tests into production monitors. This guide walks through creating a checkly.config.ts, testing it, and deploying your first check suites.
  • A Checkly account
  • A repository with Playwright tests and a playwright.config.ts file
  • Playwright version 1.40 or higher
  • Node.js installed locally

Step 1: Install the Checkly CLI

terminal
npm install --save-dev checkly
If you use TypeScript, also install jiti to bundle config and test files correctly:
terminal
npm install --save-dev jiti

Step 2: Create Your checkly.config.ts

Create a checkly.config.ts file in your project root. This file defines which tests become monitors and how they run. Basic structure:
checkly.config.ts
import { defineConfig } from 'checkly'
import { Frequency } from 'checkly/constructs'

export default defineConfig({
  projectName: 'My App Monitoring',
  logicalId: 'my-app-monitoring',

  checks: {
    // Point to your Playwright config
    playwrightConfigPath: './playwright.config.ts',

    // Define which tests to monitor
    playwrightChecks: [
      // Add check suites here
    ],

    // Default settings for all checks
    frequency: Frequency.EVERY_10M,
    locations: ['us-east-1', 'eu-west-1'],
  },

  cli: {
    runLocation: 'us-east-1',
  },
})

Step 3: Select Tests to Monitor

Each entry in the playwrightChecks array becomes a separate monitor. Use pwProjects or pwTags to control which tests each check suite runs. This example creates two check suites — one for critical flows running every 5 minutes, and one for secondary features at a lower frequency:
checkly.config.ts
export default defineConfig({
  // ... config from above

  checks: {
    playwrightConfigPath: './playwright.config.ts',
    playwrightChecks: [
      {
        name: 'Critical User Flows',
        logicalId: 'critical-flows',
        pwProjects: ['critical'],
        frequency: Frequency.EVERY_5M,
        locations: ['us-east-1', 'eu-west-1', 'ap-south-1'],
      },

      {
        name: 'Important Features',
        logicalId: 'important-features',
        pwProjects: ['important'],
        frequency: Frequency.EVERY_30M,
        locations: ['us-east-1', 'eu-west-1'],
      },
    ],
  },
})
Per-check frequency and locations override the global defaults set in Step 2. For strategies on grouping tests by urgency, environment, or feature area, see Test organization.

Step 4: Test Your Configuration

Before deploying, validate your monitoring setup locally:
terminal
npx checkly test --record
The --record flag uploads results to Checkly so you can review traces, logs, and screenshots in the UI. This runs your check suites in Checkly’s infrastructure and shows results:
Parsing your project...
Validating project resources...
Bundling project resources...

Running 2 checks in us-east-1.

playwright.config.ts
 Critical User Flows (12s)
 Important Features (8s)

2 passed, 2 total
Test specifying the environment type:
terminal
npx checkly test --record --env ENVIRONMENT=staging
Difference between checkly test and checkly pw-test:
  • checkly test - Runs check suites defined in checkly.config.ts and check.ts files
  • checkly pw-test - Runs any Playwright tests defined in your playwright.config.ts, directly on Checkly’s cloud infrastructure. See the CLI reference.

Step 5: Deploy to Production Monitoring

Deploy your check suites to start continuous monitoring:
terminal
npx checkly deploy
Confirm deployment:
> You are about to deploy your project "my-app-monitoring" to account "My Account".
  Do you want to continue? yes

Successfully deployed project "my-app-monitoring" to account "My Account".
Your monitors run on the configured schedule. View results in your Checkly dashboard.

Best Practices

Next Steps