Playwright

Instructions for getting your Playwright tests to run on Testery

Playwright enables reliable end-to-end testing for modern web apps. Here's more information on Getting Started with Playwright.

Your project requires simple modifications to your playwright config file.

Parallel

Testery will handle the level of parallelism for the test files, so for best result set this option to false. If you would like to keep this true for local runs and false for Testery, you can add an environment variable check for IS_TESTERY and set to false when present.

fullyParallel: false
fullyParallel: process.env.IS_TESTERY ? false : true

Retries

Testery also will handle any retries, so it's best to leave them at 0 when running on the cloud.

retries: 0

Viewport

Add the viewport option in your use array for each project under the projects array and set to 1920x1080. This will allow better sized video and screenshots to be displayed in Testery.

  use: {
    ...devices['Desktop Chrome'],
    channel: 'chrome',
    viewport: { width: 1920, height: 1080 },
  }

Screenshots

If you want your captured screenshots to display in Testery, you'll need adjust the outputDir option to a predefined path: ./screenshots

Also make sure your use block to contains right value for screenshots to be taken. For example:

For better screenshot names, it's recommended to use a fixture instead.

Suggested Testery config example

Last updated

Was this helpful?