Playwright: reduce workers to fix WASM login timeouts under load #103
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
With 166 Playwright tests (up from 111), browser tests that need WASM shell login timeout at 120s. Multiple concurrent browsers all loading 2MB WASM binary overwhelm the container.
Fix
Set
workers: 3inplaywright.config.ts. Reduces parallelism, prevents WASM load contention.Future improvement
Implement
storageState(shared login session) with project separation so login-specific tests still test the full flow. Would make tests faster without reducing parallelism.Signed-off-by: mik-tf
Implementation
Implemented storageState with project separation (best approach):
How it works
global.setup.ts— logs in once, saves browser state (cookies + localStorage) totest-results/.auth/state.jsonauth.spec.tsandjwt-auth.spec.tsrun with fresh browser (no saved state). These test the actual login flow.workers: 3— additional safety against WASM load contention.Benefits
Testing locally now.
Signed-off-by: mik-tf
Pushed with workers:6 (storageState handles the login overhead, higher parallelism is fine). Can tune up/down based on CI results.
Signed-off-by: mik-tf