notes.dt.in.th

Playwright enables reliable end-to-end testing for modern web apps.

Notes

  • Test debugging configuration:

      use: {
        // Disable tracing when running locally,
        // as it breaks the "Show & Reuse Browser" feature.
        trace: process.env.CI ? 'retain-on-failure' : 'on-first-retry',
    
        video: process.env.CI ? 'on' : 'off',
        screenshot: process.env.CI ? 'on' : 'off',
      }
  • Web server configuration:

      webServer: {
        command: 'yarn start -p 2022',
        port: 2022,
        // Do not start a server if it is already running locally.
        reuseExistingServer: !process.env.CI,
      },
  • The default workflow file generated by create-playwright