microsoft / microsoft/playwright-java
[Feature]: let bunch of tests run serial and not while other tests are running
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 298
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 14
Description
🚀 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the projects configuration shown in the issue and the serial.spec.ts naming pattern, then trace how project dependencies, UI-mode runs, and workers are scheduled. Done means serial tests avoid concurrent database-changing tests without forcing unrelated parallel tests to run first, including when one serial test is run in the UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100