📚 Name a worker count when running the Playwright suite (#12799)

* 📚 Name a worker count in the frontend testing memory

The memory gave the command and left the count to the config, whose
default of one worker makes the whole suite slow, and CI's two per
shard reads as the number to copy.

Records the count to reach for and what it costs: about 8 GB of
browser memory at four workers, so a 64 GB host takes four beside a
watching devenv, and a 32 GB host takes two, or four on a slim devenv.

AI-assisted-by: deepseek-v4.1-flash

* 📚 Gate the Playwright worker count on cores and memory

Four workers keep about nine hardware threads busy, measured as the
container's CPU seconds over wall time, and hold about 8 GB of browser
processes. States the cost per worker, so a reader on a smaller machine
does not oversubscribe it.

AI-assisted-by: deepseek-v4.1-flash
This commit is contained in:
Álvaro Tejero-Cantero 2026-11-16 13:55:05 +01:00 committed by GitHub
parent bbaebfb146
commit bd4af28d78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,7 @@ New frontend test namespaces must be required/listed in `frontend_tests/runner.c
## Playwright integration tests
Do not add, modify, or run Playwright integration tests under `frontend/playwright` unless explicitly asked. When explicitly asked, use `pnpm run test:e2e` or `pnpm run test:e2e --grep "pattern"` from `frontend/`; ensure dependencies are installed through `./scripts/setup` if the environment is not prepared.
Do not add, modify, or run Playwright integration tests under `frontend/playwright` unless explicitly asked. When explicitly asked, run the whole suite with a worker count sized to the machine: `pnpm run test:e2e --workers=N` from `frontend/`, about one worker per two hardware threads, because each keeps two or three busy and holds about 2 GB of browser memory. The config's default of one worker leaves it slow; four take a 16-thread host from 48 minutes to 35 and fit a 64 GB machine beside a watching devenv, while a 32 GB machine takes two, or four with a slim devenv. `--grep "pattern"` narrows the run. Ensure dependencies are installed through `./scripts/setup` if the environment is not prepared.
Integration tests fake backend behavior by intercepting network/websocket traffic, so every RPC or websocket the page needs must be mocked. Use existing Page Object Models:
- `BasePage.mockRPC` intercepts RPC calls and already prefixes `/api/rpc/command/`; pass command names such as `get-profile`, not full URLs.