r/Playwright

test locks in 1.63 might finally let me delete my workers: 1 project

Just saw this in the 1.63 notes. You can give a test a named lock and any tests sharing that lock name won't run at the same time, across files and workers. Everything else stays parallel.

I have a handful of tests that hit the same account settings and they'd stomp on each other in parallel. My fix was shoving them into their own project with a single worker, which works but makes that chunk of the suite crawl. Locks look like exactly the thing I was faking.

Haven't tried it yet but planning to this week. Main thing I'm curious about is whether it holds up with sharding, since the notes only mention files, workers and projects.

Anyone already moved over to it? Or found a reason it doesn't replace the serial stuff

reddit.com
u/ContributionIll9303 — 11 days ago

Handle 401s and session expiry in long regression suites

How to handle 401s and session expiry in long regression suites which took somewhere around 4+ hours, when token lifetime is close to 5-10 minutes and Rate limit issues from Oauth, for both UI + API automation using same credentials?

Please guide if anyone has faced this and found solution
I tried token refresh and ui login in between tests in tests.

reddit.com
u/indiengg — 11 days ago