playwright
playwright copied to clipboard
[Feature]: UI Mode - Set number of workers in ui mode interface
🚀 Feature Request
In the UI mode window - add a worker count and have the ability to set number of workers when running tests in UI mode.
Example
Add a worker count that can be adjusted in ui mode.
Motivation
I occasionally want to run tests with just one worker to test stability of tests one by one as well as some tests are run in a single context back to back.
I would need to close ui mode and add the worker flag to the command prompt to update this.
+1
I support this.
What I'd also like to see, is workers based off of the project. I want to run most of my tests locally in parallel, but some of my tests NEED to be ran in serial. I would imagine that I could configure this per project, but it seems that I'm limited to only setting the amount of workers in the PlaywrightTestConfig
rather than the project.
export default defineConfig({
testDir: "./tests",
fullyParallel: true,
workers: 2,
retries: 0,
reporter: [["html"], ["list"]],
use: {
baseURL: process.env.BASE_URL || "http://localhost:3000",
trace: "on-first-retry",
},
projects: [
{
name: "extra_secret_tests",
fullyParallel: false, //<------- Disables *IN THE TEST FILE* but not in the suite...
testDir: "./tests/extra_secret_tests",
workers: 1, //<------ Why doesn't this work!!
use: {
...devices["Desktop Chrome"],
viewport: { width: 1920, height: 1080 },
storageState: STORAGE_STATE,
},
},
],
});
+1