From bd4af28d78f14fb800b9f808be4522259597bd4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero-Cantero?= <807608+alvorithm@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:55:05 +0100 Subject: [PATCH] :books: Name a worker count when running the Playwright suite (#12799) * :books: 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 * :books: 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 --- .serena/memories/frontend/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.serena/memories/frontend/testing.md b/.serena/memories/frontend/testing.md index b16acf8b6d..7678594169 100644 --- a/.serena/memories/frontend/testing.md +++ b/.serena/memories/frontend/testing.md @@ -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.