- Detailed trace files with step-by-step information on your test cases
- Video recordings of browser sessions
- Automatic
awaitsfor reliable automation - Diverse set of assertions like
toContainText(),toHaveURL() - Easy to use locators like
getByTitle,getByRole - Visual regression testing
Features
This is the list of Playwright features that are currently supported. We will update it as more features become supported.| Feature | Supported? |
|---|---|
| Trace files | Yes |
| Video recordings | Yes |
| API testing | Yes |
| Custom fixtures | Yes |
| Reporters | JSON |
| Typescript | Yes |
| Global configuration | Yes, a subset of playwright config options. |
| Visual comparisons | Yes |
| Test retry | No, enable Checkly’s “Double-check on failure” in the check settings to retry a check. |
| Parallelism and sharding | No |
Supported configuration options
We currently support the following configuration options. We will update this list as more options become supported.We do not support theprojects,globalSetup,globalTeardownandstorageStateoptions yet, but will in a future release.
- Global
- Use
- Expect
| Option | Supported |
|---|---|
timeout | ✅ |
use | ✅ |
expect | ✅ |
testDir | ❌ |
fullyParallel | ❌ |
forbidOnly | ❌ |
retries | ❌ |
workers | ❌ |
reporter | ❌ |
testMatch | ❌ |
testIgnore | ❌ |
outputDir | ❌ |
globalSetup | ❌ |
globalTeardown | ❌ |
projects | ❌ |
webServer | ❌ |
global options you can check playwright official documentation Test configurationA check using the Playwright Test Runner (
@playwright/test) will currently run around 30-50% longer than a regular Playwright check (playwright). This is caused by the automatic creation of trace and video assets. We are aware of this and are investigating solutions. If this is significantly degrading the performance of your check, we recommend to divide longer tests into multiple checks.Hooks
Playwright Test Runner offers hook functions such astest.afterEach() and test.beforeEach() that run before or after individual test cases or test.afterAll() and test.beforeAll() that run before or after all tests have started/finished.
You can find more information on available methods in the official documentation.
Viewing trace files
When a@playwright/test test case fails, Checkly will record and make its trace files available via the UI. You can download the trace files for manual inspection or view them directly with trace.playwright.dev.
Using the Playwright Trace Viewer you can effortlessly view your test, skip back and forth between actions, view snapshots and metadata, and more. This makes it very easy to inspect individual traces and debug failing tests.
When running tests from the editor page, trace files are always available for download and preview,
regardless of whether the check is passing or failing. For scheduled check runs traces are only preserved when the check failed.
Video recordings
When a@playwright/test test case fails, Checkly will record a video for each page navigation and make it available in the UI. It is a great tool to get a first look of the actions and their outcome to quickly identify what failed, and to visualize regressions.
Here’s an example of a Playwright Test script that fails, and provides a video of the test sequence.
When running tests from the editor page, video files are always available for download and preview, regardless of whether
the check is passing or failing. For scheduled check runs videos are only preserved when the check failed.
PageObject Model (POM)
If you are structuring your test codebase following the PageObject pattern, you can use the Checkly CLI out of the box. Just make sure that:- the folder you initialize your CLI in when building your project sits above your test spec files and their dependencies
- your
testMatchis pointing to the path(s) where your test specs live
Global configuration
We are gradually rolling out support for global configuration options for the Playwright Test Runner. This allows you to configure your Playwright tests in a single place, instead of having to repeat the same configuration for each test file. There are three things you should be aware of:- You can only use a subset of the Playwright config options. See the supported configuration options section for more information.
- You need to add the
playwrightConfigsection to yourcheckly.config.tsfile, nested under thebrowserCheckssection. - We explicitly do not read from the existing
playwright.config.tsorplaywright.config.jsfile in your project. This is to avoid any confusion about which config file is used to run your tests and to prevent any unexpected behaviour.
playwright.config.ts or playwright.config.js file in your project that you want to import,
you can simply run the sync-playwright
checkly.config.ts file.
- TypeScript
- JavaScript
checkly.config.ts
Multi Test Checks
One of the key benefits of using Playwright Test is that you can split your check into multiple independent test cases, and group them using thetest.describe function. Your Checkly check will fail if at least one of the test cases fails.
- TypeScript
- JavaScript
example.spec.ts
An executed browser check that includes multiple Playwright test cases still counts as a single check run towards your pricing plan’s defined limits.