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 only one simple modification to your playwright.config.js. Simply add the code snippet below into each project in the projects array.

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

When complete, your projects array should look something like this...

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

Screenshots

If you want to capture screenshots in your tests, you'll need to add additional lines to your playwright.config.js

outputDir: './screenshots'

Also update each use block to contain

screenshot: 'only-on-failure'

Last updated