playwright-java icon indicating copy to clipboard operation
playwright-java copied to clipboard

[Feature]: let bunch of tests run serial and not while other tests are running

Open kicktipp opened this issue 2 months ago • 0 comments

🚀 Feature Request

Most tests can run in parallel. But I have some test (*serial.spec.ts) which should not run parallel to any other test as they modify the database in a way that other tests get confused

Example

The only way I found is to configure two projects with dependencies

  projects: [
    {
      name: 'parallel',
      testIgnore: [/.*.serial.spec.ts/],
      use: {
        ...devices['Desktop Chrome'],
        launchOptions: {
          args: ['--ignore-certificate-errors']
        }
      }
    },
   {
      name: 'serial',
      testMatch: /.*.serial.spec.ts/,
      dependencies: ['parallel'],
      use: {
        ...devices['Desktop Chrome'],
        launchOptions: {
          args: ['--ignore-certificate-errors']
        }
      },
      retries: 0,
      workers: 1
    }]

Motivation

This works, but when i run one serial test in the UI, all parallel tests get executed before. Or I missed something.

kicktipp avatar Nov 24 '25 22:11 kicktipp