I've an e2e test that uses an authenticated user, and uses a button to start a process:
load page
-> click start button
-> load new page
-> check process ends
-> click close (process page)
-> click stop button
(and if the process is already running, the page offers reconnect
& stop
buttons instead)
This is fine, and I have a test that happily hits the stop
button if the process is marked as running, and continues from there
The flaw with this technique is when testing across three browsers [aka projects
] - when a 2nd worker starts up, to test the page in a different browser, it spots the process is running [from worker 1]... and shuts the process down - which breaks worker 1.
Running this particular test with --repeat-each=100 --workers=1
, I get three failures across two browsers (which may be to do with the process-page loading - not sure yet)... so the use of parallel workers is essentially killing that specific test.
Obviously I don't want to run everything with just one worker... just those tests where an authenticated user does stuff in the UI.
Is there a way to set specific tests to run on a single worker?
(I can cope if it's at test
, test.describe
, or file level... that's just organisation & typing)