Skip to content

docs(test-parallel): add guidance on shared state in parallel tests#41720

Open
yury-s wants to merge 1 commit into
microsoft:mainfrom
yury-s:fix-41671
Open

docs(test-parallel): add guidance on shared state in parallel tests#41720
yury-s wants to merge 1 commit into
microsoft:mainfrom
yury-s:fix-41671

Conversation

@yury-s

@yury-s yury-s commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Add an "Avoiding shared state in parallel tests" section to the parallelism guide: explains Playwright's built-in isolation (separate worker processes, isolated browser contexts) and the genuine pitfalls (external resources, files on disk, worker-shared state).

Fixes #41671

@yury-s yury-s requested a review from dgozman July 9, 2026 22:33
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [msedge] › mcp/annotate.spec.ts:497 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest-msedge
❌ [webkit] › mcp/cli-killall.spec.ts:42 › kill-all kills filtered dashboard pid @mcp-ubuntu-latest-webkit

7758 passed, 1249 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

7 flaky ⚠️ [chromium-library] › library/inspector/recorder-api.spec.ts:120 › should type `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:337 › screencast › should work for popups `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/tracing.spec.ts:429 › should produce screencast frames crop `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:275 › screencast › should capture navigation `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node20`

49517 passed, 1161 skipped


Merge workflow run.

@dgozman

dgozman commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

I am not sure this helps much as it's written. A wall of text that nobody will read. If it were to have some snippets/recipes to deal with common parallel-specific issues, that would probably be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Add guidance on shared state pitfalls in parallel test execution

2 participants