Learn more about Playwright Check Suites in the Playwright Check Suites overview.
Playwright Check Suites are currently in Beta. Join the Slack community to get live updates on feature development and get help getting started.
Use Playwright Check Suites to reuse your existing Playwright test suite to run it as end-to-end tests and synthetic monitoring. The examples below show how to configure Playwright Check Suites for different testing and monitoring scenarios.
Before creating Playwright Check Suites, ensure you have:For additional setup information, see CLI overview.
import { PlaywrightCheck } from "checkly/constructs"

new PlaywrightCheck("critical-e2e-monitor", {
  name: "Critical E2E Monitor",
  playwrightConfigPath: "./playwright.config.ts",
})

Configuration

The Playwright Check Suite configuration consists of specific Playwright Check Suite options and inherited general monitoring options.
ParameterTypeRequiredDefaultDescription
playwrightConfigPathstring-Path to the Playwright configuration file (playwright.config.js/ts)
installCommandstring-Command to install dependencies before running tests
testCommandstringnpx playwright testCommand to execute Playwright tests
pwProjectsstring string[]-Specific Playwright projects to run from your configuration
pwTagsstring string[]-Tags to filter which tests to run using Playwright’s grep functionality
includestring string[]-File patterns to include when bundling the test project

Playwright Check Suite Options

playwrightConfigPath
string
required
The path to the Playwright configuration file (playwright.config.js/ts) which defines test settings, browser configurations, and project structure.Usage:
new PlaywrightCheck("critical-e2e-monitor", {
  name: "Critical E2E Monitor",
  playwrightConfigPath: "../playwright.config.ts",
})
installCommand
string
The command to install dependencies before running tests. This configuration is useful for ensuring test dependencies are available in the runtime environment.Checkly defaults to using npm, but automatically detects other package managers if lock files are present.Usage:
new PlaywrightCheck("critical-e2e-monitor", {
  name: "Critical E2E Monitor",
  playwrightConfigPath: "../playwright.config.ts",
  installCommand: "npm ci",
})
testCommand
string
default:"npx playwright test"
The command to execute Playwright tests when running npx checkly test or running your Playwright Check Suite as monitor.Usage:
new PlaywrightCheck("critical-e2e-monitor", {
  name: "Critical E2E Monitor",
  playwrightConfigPath: "../playwright.config.ts",
  testCommand: "npx playwright test --grep@checkly --config=playwright.foo.config.ts",
})
If you configure the testCommand property and pwTags or pwProjects the options will be merged and all configurations applied to npx playwright test.
pwProjects
string
The defined projects to run from your Playwright configuration.Usage:
new PlaywrightCheck("critical-e2e-monitor", {
  name: "Critical E2E Monitor",
  playwrightConfigPath: "../playwright.config.ts",
  pwProjects: "chromium",
})
Playwright Test Projects let you run different test files in different browsers and with different settings. They’re the recommended way to group and bundle test functionality.
pwTags
string
The tags to filter which tests to run using Playwright’s grep functionality.Tests matching any of these tags will be executed.Usage:
new PlaywrightCheck("critical-e2e-monitor", {
  name: "Critical E2E Monitor",
  playwrightConfigPath: "../playwright.config.ts",
  pwTags: "@smoke",
})
Learn more about test tags and annotations in the Playwright annotation docs.
include
string
The file patterns to include when bundling the Playwright Check Suite. Use this option to include test files, utilities, and other assets that aren’t automatically discovered.Usage:
new PlaywrightCheck("critical-e2e-monitor", {
  name: "Critical E2E Monitor",
  playwrightConfigPath: "../playwright.config.ts",
  include: ['.npmrc']
})
The Playwright Check Suite bundling process uses a breadth-first search algorithm starting from the entrypoint to recursively find all local file dependencies. It parses import/require statements and follows the dependency graph to include all necessary files.Use include to bundle files that are not directly imported/required.

General Check Options

name
string
required
Friendly name for your Playwright Check Suite that will be displayed in the Checkly dashboard and used in notifications.Usage:
new PlaywrightCheck("critical-e2e-monitor", {
  name: "Critical E2E Monitor",
  playwrightConfigPath: "../playwright.config.ts",
})
frequency
Frequency
How often the Playwright Check Suite should run. Use the Frequency enum to set the check interval.Usage:
new PlaywrightCheck("my-pwt-check-suite", {
  name: "My Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  frequency: Frequency.EVERY_5M,
})
Examples:
// For critical user journeys
new PlaywrightCheck("my-pwt-check-suite", {
  name: "My Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  frequency: Frequency.EVERY_2M,
  pwTags: ["@critical"],
})
Available frequencies: EVERY_1M, EVERY_2M, EVERY_5M, EVERY_10M, EVERY_15M, EVERY_30M, EVERY_1H, EVERY_2H, EVERY_6H, EVERY_12H, EVERY_24H
locations
string[]
default:"[]"
Array of public location codes where the Playwright Check Suite should run. Multiple locations provide geographic coverage and redundancy.Usage:
new PlaywrightCheck("my-pwt-check-suite", {
  name: "My Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  locations: ["us-east-1", "eu-west-1", "ap-southeast-1"],
})
Examples:
// Comprehensive global monitoring
new PlaywrightCheck("global-pwt-check-suite", {
  name: "Global Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  locations: [
    "us-east-1", // N. Virginia
    "us-west-1", // N. California
    "eu-west-1", // Ireland
    "ap-southeast-1", // Singapore
    "ap-northeast-1", // Tokyo
  ],
})
Use cases: Global user experience monitoring, regional performance testing, compliance requirements.
activated
boolean
default:"true"
Whether the Playwright Check Suite is enabled and will run according to its schedule.Usage:
new PlaywrightCheck("disabled-pwt-check-suite", {
  name: "Disabled Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  activated: false,
})
tags
string[]
default:"[]"
Array of Checkly tags to organize and categorize your Playwright Check Suite in the Checkly infrastructure.Usage:
new PlaywrightCheck("my-check-suite", {
  name: "My Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  tags: ["pwt", "critical"],
})
Examples:
new PlaywrightCheck("my-check-suite", {
  name: "My Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  tags: ["critical", "revenue", "high-priority"],
})
Use cases: Organization, filtering, alerting rules, reporting.
environmentVariables
object[]
default:"[]"
Check-level environment variables that will be available during test execution. Useful for test configuration and sensitive data.Usage:
new PlaywrightCheck("user-flow-pwt-check-suite", {
  name: "User Flow Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  environmentVariables: [
    { key: "TEST_USERNAME", value: "testuser@example.com" },
    { key: "TEST_PASSWORD", value: "{{SECRET_PASSWORD}}", secret: true },
  ],
})
Parameters:
ParameterTypeRequiredDescription
keystringEnvironment variable name
valuestringEnvironment variable value
secretbooleanWhether the value should be encrypted and hidden
Examples:
new PlaywrightCheck("user-flow-pwt-check-suite", {
  name: "User Flow Playwright Check Suite",
  playwrightConfigPath: "../playwright.config.ts",
  environmentVariables: [
    { key: "TEST_USERNAME", value: "testuser@example.com" },
    { key: "TEST_PASSWORD", value: "{{SECRET_PASSWORD}}", secret: true },
  ],
})
Use cases: Test configuration, authentication, API keys, feature flags, environment-specific settings.

Examples

const playwrightChecks = new PlaywrightCheck("multi-browser-check", {
  name: "Multi-browser check suite",
  playwrightConfigPath: "./playwright.config.ts",
  // Playwright Check Suites support all browsers
  // defined in your `playwight.config`
  pwProjects: ["chromium", "firefox", "webkit"],
})