Testery Docs
TesteryFeaturesPricingRelease Notes
  • Testery Documentation
  • Release Notes
  • Get Started
    • Getting Started Guide
      • Create a Testery Account
      • Configure Your Project
      • Run Your Tests
      • Configure Slack Alerts
      • Schedule Your Test Runs
      • Invite Your Team
      • Get More From Testery
  • Get to Know Testery
    • Dashboard
    • Test Runs
      • Test Selection Rules
    • Projects
    • Test Triggers
    • Environments
    • Alerts
    • Settings
    • Test Plans
    • Test Stacks
      • Python
      • Node.js 16 End of Life
      • Default Chrome Version Change
      • Python 3.8 End of Life
    • Deployments
    • System Variables
    • Tags
    • Screenshots
    • Uploading Test Artifacts to Testery
    • Setting Test Execution Priority
    • Setting the Number of Parallel Tests
  • Integrate with Testery
    • Built-In Integrations with Testery
      • Jira
      • Slack
    • CI/CD Integration Guides
      • Azure Devops Pipelines
      • Set Up CircleCI to Run Testery Tests
      • Jenkins
      • GitHub Actions
      • Octopus Deploy
      • TugboatQA
    • Testery CLI
    • Testery REST API
      • Testery REST API Resources
    • Microsoft Teams
  • Framework-specific Guidance
    • Supported Testing Frameworks
    • Cypress
      • Updating Cypress Tests to Output in JUnit XML Format
    • Playwright
      • Update Playwright Tests to Output in JUnit XML Format for Import Into Testery
    • PyTest
      • Update Pytest to Generate JUnit XML for Import into Testery
    • TestNG
      • Updating TestNG Tests to Output in JUnit XML Format
  • How-To
    • Enable or Disable Automatic Rerunning of Tests
    • Run Cypress Tests without Connecting Repository
    • How to Store Sensitive Data Like Username and Password For a Cypress Test
    • Connect to a Private npm Repository
    • Running Scripts Before the Tests
    • Upload Test Run for Analysis
  • MISC
    • Troubleshooting Steps
  • Fixing Tests
    • Fix Common Selenium Exceptions
      • Fix a ChromeDriver Version Exception
      • Fix a NoSuchElement Exception
      • Fix a TimeoutException
      • Fix an ElementNotVisibleException
      • Fix a StaleElementReferenceException
      • Fix a WebDriverException
      • Fix an InvalidArgumentException
      • Fix a NoSuchWindowException
      • Fix an UnhandledAlertException
      • Fix an InvalidSelectorException
Powered by GitBook
On this page

Was this helpful?

  1. Framework-specific Guidance

Playwright

Instructions for getting your Playwright tests to run on Testery

PreviousUpdating Cypress Tests to Output in JUnit XML FormatNextUpdate Playwright Tests to Output in JUnit XML Format for Import Into Testery

Last updated 6 months ago

Was this helpful?

enables reliable end-to-end testing for modern web apps. Here's more information on 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

outputDir: './screenshots'

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

screenshot: 'only-on-failure'

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

  screenshots: [async ({ page }, use, testInfo) => {
    await use()
    await page.screenshot({ path: `./screenshots/${testInfo.title}.png` })
  }, { auto: true }],

Suggested Testery config example

export default defineConfig({
  testDir,
  outputDir: './screenshots',
  fullyParallel: false, // Testery will handle the parallelism
  retries: 0, // Testery will handle the retries
  workers: 4, // Leave this to local running preference. Testery will run one at a time per worker (File/Feature)
  reporter: [['list']], // Leave this to local running preference. Testery will change this to json report when running on cloud
  use: {
    trace: 'retain-on-failure',
    screenshot: 'only-on-failure'
  },
  timeout: 60_000, // Make sure this is less than test timeout in Testery to get more detailed timeout error in the log

  projects: [ // recommend using the playwright project field in test runs to separate different project to different runs
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'], 
      viewport: { width: 1920, height: 1080 } }
    }
  ]
})

Playwright
Getting Started