|
|
|
|
|
by devkumardev2001
17 days ago
|
|
Same test IDs on both runs is the right bar. I’d add one more check before calling a re-shard a win: Playwright shards by file, not by individual test. So equal file counts don’t mean equal workloads. One slow file can dominate a shard, and once it moves, another may become the bottleneck. Track the longest shard’s duration over time, not just the median. On Bnjoroge’s question, compare the total test count in the merged report with npx playwright test --list on the same commit. That gives you a simple check that the expected tests are represented in the results. Two lessons from running Playwright in Kubernetes: CPU throttling can cause timeouts that look like flaky tests, so monitor throttling before increasing retries. And keep flaky tests in a separate, non-blocking job rather than letting an optimizer remove them. Otherwise, you improve the metric without fixing the underlying issue. Disclosure: I work on TestDino, a Playwright reporting tool. |
|
The totals check gets easier with the blob reporter: run each shard with reporter: 'blob', then npx playwright merge-reports --reporter html ./all-blob-reports. You get one report containing every shard's tests, so a mismatch against --list stands out.
On throttling, workers default to half the logical CPU cores, and the workers option also accepts a percentage. If the count the runner picks is above your CPU limit, timeouts follow. Set workers explicitly in the pod config.