checkly.config.ts/js file to define your Playwright Check Suite. Each Playwright Check Suite can be connected to references in your playwright.config.ts/js file.
A Playwright Check Suite can run up to 15 minutes. Please contact us in the Checkly Web App or get in touch with your account executive if you’re interested in longer runs.
Playwright Check Suite definition
To add Playwright Check Suites to your Checkly monitoring setup, specify the path to yourplaywright.config.ts/js and add a new playwrightChecks property to the existing checks configuration in your checkly.config.ts/js.
checkly.config.ts
name- a human friendly name for your check suite.logicalId- a reference for your check suite.
frequency, alertChannels or locations are inherited from the general Checkly configuration if not specified otherwise.
Playwright references
Without limiting and selecting specific tests or Playwright projects, the Checkly infrastructure will run and deploy all your existing Playwright tests (similar to whatnpx playwright test runs) as monitors.
Specify which tests should become part of global end-to-end monitoring by defining these properties:
-
pwProjects: select an existing project by name from your Playwright configuration to create a Playwright Check Suite. -
pwTags: select tagged tests that will be grouped into a Playwright Check Suite.
pwTags and pwProjects to generate your check suite, too.
For example:
checkly.config.ts
Monitoring customizations
A Playwright Check Suite inherits multiple properties from the abstractCheck class:
nameactivatedmutedlocationstagsfrequencyalertChannelsprivateLocationsalertEscalationPolicy
Checks’ Retry strategy is not applicable for Playwright checks. Playwright includes its own retry features that can be set up directly in your
playwright.config.ts/js file with the retries option. This allows for more detailed management of test retries within Playwright, when your check runs.-
installCommand:Override the command to install dependencies.npm install --devis used by default. -
testCommand:Override the command to test.npx playwright testis used by default with the tags, projects, and config file options your check specifies. -
group:The group construct this check belongs to.
Customize install and test commands
By default, Checkly runsnpm install --dev to install dependencies and npx playwright test to run tests. The testCommand automatically includes your pwProjects, pwTags, and Playwright config file path.
You can override these commands to:
Use a different package manager:
Example Checkly config
checkly.config.ts
Testing configuration locally
Before deploying your Playwright Check Suites, validate your configuration locally:npx checkly test command runs your Playwright tests locally using the same configuration that Checkly will use in production. This helps catch configuration errors before deployment.
Common issues & troubleshooting
Configuration errors
InvalidlogicalId
logicalId. The logicalId is used as a stable reference across deployments.
Missing Playwright configuration
playwrightConfigPath points to the correct relative path from your checkly.config.ts file.
Test execution issues
Tests exceed 20-minute limit If your Playwright Check Suite times out after 20 minutes:- Split large test suites into multiple Playwright Check Suites using
pwTagsorpwProjects - Use
.onlyor.skipin your tests during development, then create separate check suites for different test priorities - Optimize slow tests by reducing wait times and parallelizing where possible
- Contact Checkly support if you need further help
- Check that your
package.jsonand lock file (e.g.,package-lock.json) are both included in your deployment. - Verify that the private registry authentication is configured correctly. See the custom dependencies guide for more details.
- Adjust the
installCommandto match your project’s expectation.
- Verify environment variables are set correctly in Checkly. You can verify your environment variables using
npx checkly env ls, or looking at your Global or Check’s environment variables in the Checkly Webapp to ensure anyprocess.env.VARIABLE_NAMEcall from your test is defined. - For persistent authentication, use Playwright’s
storageStatefeature.