Skip to content

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

@kicktipp

Description

@kicktipp

🚀 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions