Skip to content

chore(cli): implement test harness#38914

Merged
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:test-harness
Jan 23, 2026
Merged

chore(cli): implement test harness#38914
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:test-harness

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

No description provided.

@github-actions

This comment has been minimized.

@pavelfeldman pavelfeldman changed the title Test harness chore(cli): implement test harness Jan 22, 2026
Comment thread tests/mcp/cli-fixtures.ts
const userDataDir = testInfo.outputPath('user-data-dir');

const daemonPath = path.resolve(__dirname, '../../packages/playwright/cli.js');
const daemon = spawn(process.execPath, [daemonPath, 'run-mcp-server', `--daemon=${socketPath}`, `--user-data-dir=${userDataDir}`], {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend using a childProcess fixture from the commonFixtures.ts - it has some useful goodies already.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave it as an exercise for the reader!

Comment thread tests/mcp/cli-fixtures.ts

cli: async ({ socketPath }, use, testInfo) => {
await use(async (args: string[]) => {
const cli = spawn(process.execPath, [require.resolve('../../packages/playwright/lib/mcp/terminal/cli.js'), ...args], {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps spawnSync will be fine here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not work!

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@pavelfeldman pavelfeldman force-pushed the test-harness branch 2 times, most recently from f40c2db to 980431f Compare January 23, 2026 02:30
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@pavelfeldman pavelfeldman merged commit 95a728a into microsoft:main Jan 23, 2026
4 of 6 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

10 failed
❌ [webkit] › mcp/snapshot-mode.spec.ts:58 › should respect --snapshot-mode=incremental @mcp-windows-latest
❌ [chrome] › mcp/cli.spec.ts:267 › save as › screenshot --full-page @mcp-macos-15
❌ [chromium] › mcp/cli.spec.ts:162 › core › dialog-accept @mcp-macos-15
❌ [chromium] › mcp/cli.spec.ts:267 › save as › screenshot --full-page @mcp-macos-15
❌ [chromium] › mcp/cli.spec.ts:342 › devtools › tracing-start-stop @mcp-macos-15
❌ [chromium] › mcp/launch.spec.ts:21 › test reopen browser @mcp-macos-15
❌ [firefox] › mcp/cli.spec.ts:267 › save as › screenshot --full-page @mcp-macos-15
❌ [firefox] › mcp/cli.spec.ts:342 › devtools › tracing-start-stop @mcp-macos-15
❌ [webkit] › mcp/cli.spec.ts:267 › save as › screenshot --full-page @mcp-macos-15
❌ [webkit] › mcp/snapshot-mode.spec.ts:58 › should respect --snapshot-mode=incremental @mcp-macos-15

3096 passed, 300 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.

2 participants