Skip to content

feat(test): support per-project webServer configuration#40869

Merged
yury-s merged 4 commits into
microsoft:mainfrom
yury-s:feat-22496
May 18, 2026
Merged

feat(test): support per-project webServer configuration#40869
yury-s merged 4 commits into
microsoft:mainfrom
yury-s:feat-22496

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented May 15, 2026

Summary

  • Add webServer to TestProject so each project can declare its own dev server(s); a per-project server is launched only when the project is selected (directly via --project or through the dependency closure), in addition to any top-level webServer.

Fixes #22496

Add `webServer` to TestProject so each project can declare its own
dev server(s). A per-project server is launched only when the project
is selected (directly via --project or through the dependency closure),
in addition to any top-level `webServer`.

Fixes microsoft#22496
Comment thread packages/playwright/src/plugins/index.ts Outdated
Comment thread packages/playwright/src/runner/tasks.ts Outdated
Comment thread packages/playwright/src/runner/testRunner.ts Outdated
Plugin registration carries a single optional projectId. The task
builders no longer take a TestRun and no longer compute an active-plugin
list up front; each plugin task's setup gates itself with
\`!plugin.projectId || testRun.projectClosureIds.has(plugin.projectId)\`.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Drop the title-based exclusion so config.webServer is shape- and
command-non-empty-checked at load time, same as project.webServer.

Also revert the testRunner.ts hoists from the previous follow-up
commit; the task builders no longer need the TestRun up front.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Validate config.webServer[*].command shape only when it is explicitly
provided. Missing command is legitimate when reuseExistingServer is
true and the server is already running; the runtime path still errors
if a command is needed but absent.
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/browsertype-connect.spec.ts:699 › run-server › should record trace with sources `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-page] › page/page-request-continue.spec.ts:756 › propagate headers cross origin redirect after interception `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/popup.spec.ts:261 › should not throw when click closes popup `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:700 › should indicate current test status `@windows-latest-node20`

41227 passed, 846 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

9 failed
❌ [chrome] › mcp/annotate.spec.ts:57 › should capture multiple screenshots in one annotation @mcp-windows-latest-chrome
❌ [chrome] › mcp/annotate.spec.ts:137 › should abort MCP annotation when last screenshot is removed @mcp-windows-latest-chrome
❌ [webkit] › mcp/annotate.spec.ts:110 › should abort annotation when last screenshot is removed @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:230 › should capture annotations via show --annotate @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:251 › should start dashboard and annotate when no dashboard is running @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:273 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:427 › should switch screencast to -s session on show --annotate @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:476 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest-webkit
❌ [webkit] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-webkit

7094 passed, 1113 skipped


Merge workflow run.

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.

[Feature] Configure web servers per project

2 participants