[Feature] file order with multiple workers
See original GitHub issueFrom looking at the documentation there doesn’t seem to be a way to specify the order that tests are run while also allowing multiple workers.
I’m currently using playwright to test a fairly complex web hosting application that has a lot of platform based settings. These settings can take a long time to update (over 1 minute) and can cause other tests to fail as they affect all users. At the moment we’re just using the single worker in the CI pipeline but as the number of tests grow this will mean the test suite will take a very long time to complete.
I was thinking of a more fully featured “test list” file where you can specify items to run sequentially and items that ok to run in parallel.
// test.list.ts
import './feature-b.spec.ts';
import './feature-a.spec.ts';
// new.test.list.ts
[
'./global-setting-a.spec.ts', // changes to global setting
['./depends-on-a-1.spec.ts', './depends-on-a-2.spec.ts', '.depends-on-a-3.spec.ts', ...etc], // runs in parallel
'./global-setting-b.spec.ts'
// runs any other tests in parallel that are not specified.
]
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to define Execution Order of Hooks in Cucumber - Tools QA
Above we mentioned two before and two after hooks. Execute the feature file as a whole and see the output below. Output Feature:...
Read more >How to order feature files in Cucumber test suite?
Cucumber features/scenarios are run in Alphabetical order by feature file name. However, if you specifically specify features, ...
Read more >Multi Process Workers - Fluentd
The multi-process workers feature launches multiple workers and use a separate process per worker. fluentd provides several features for multi-process workers.
Read more >Parallel Execution - Cucumber Documentation
Create a parallel folder (or any other name) in src/test/resources path and add the two feature files ( scenarios.feature and scenario-outlines.feature ) ...
Read more >Organizing Test Suite - WebdriverIO
In general, try to test only a single feature per spec file. Try to not have too many or too few tests in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The timing here is very nice! Please watch: https://github.com/microsoft/playwright/issues/14895#issuecomment-1207665459. Folding into that issue.
It looks like the documentation was recently updated for “test list” files.
I was thinking something along the lines of syntax like this, but it’s just a rough idea.
Important point is that multiple workers can be assigned. In the example above if 6 workers are allocated:
addEmailRole
is being worked through only 1 worker is being used, while 5 sit idle.[emailsBulkActionBar, addEmail]
begins all 6 workers can be allocated.removeEmailRole
won’t start until all the tests have completed in[emailsBulkActionBar, addEmail]