Skip to content

feat: Allow configuring last-run output file location#40806

Merged
yury-s merged 3 commits into
microsoft:mainfrom
twk3:feat/last-run-output-file
May 18, 2026
Merged

feat: Allow configuring last-run output file location#40806
yury-s merged 3 commits into
microsoft:mainfrom
twk3:feat/last-run-output-file

Conversation

@twk3
Copy link
Copy Markdown
Contributor

@twk3 twk3 commented May 12, 2026

Allow configuration via environment variable like other reporters.

Left undocumented for now as lastRun is an internal reporter, so it didn't fit well adding it to the existing reporters doc.

Fixes #40805

Allow configuration via environment variable like other reporters

Fixes microsoft#40805
@twk3
Copy link
Copy Markdown
Contributor Author

twk3 commented May 12, 2026

@microsoft-github-policy-service agree

Comment thread tests/playwright-test/runner.spec.ts Outdated
Comment thread packages/playwright/src/runner/lastRun.ts Outdated
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@twk3 twk3 requested a review from yury-s May 15, 2026 15:01
Comment thread packages/playwright/src/program.ts Outdated
['--headed', { description: `Run tests in headed browsers (default: headless)` }],
['--ignore-snapshots', { description: `Ignore screenshot and snapshot expectations` }],
['--last-failed', { description: `Only re-run the failures` }],
['--last-run-file <file>', { description: `Path of the last-run JSON file used by --last-failed (also configurable via PLAYWRIGHT_LAST_RUN_OUTPUT_FILE).` }],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

--last-run-file -> --last-failed-file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@yury-s I've applied your feedback

Comment thread packages/playwright/src/program.ts Outdated
['--headed', { description: `Run tests in headed browsers (default: headless)` }],
['--ignore-snapshots', { description: `Ignore screenshot and snapshot expectations` }],
['--last-failed', { description: `Only re-run the failures` }],
['--last-run-file <file>', { description: `Path of the last-run JSON file used by --last-failed (also configurable via PLAYWRIGHT_LAST_RUN_OUTPUT_FILE).` }],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It sounds that this option is required for --last-failed, let's rephrase the description to say that this is only needed to change the default last-failed file location.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@twk3 twk3 requested a review from yury-s May 16, 2026 02:32
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [chrome] › mcp/annotate.spec.ts:57 › should capture multiple screenshots in one annotation @mcp-ubuntu-latest-chrome
❌ [chrome] › mcp/annotate.spec.ts:57 › should capture multiple screenshots in one annotation @mcp-windows-latest-chrome
❌ [chromium] › mcp/annotate.spec.ts:137 › should abort MCP annotation when last screenshot is removed @mcp-windows-latest-chromium

7096 passed, 1104 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 flaky ⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-page] › page/page-leaks.spec.ts:85 › click should not leak `@firefox-ubuntu-22.04-node20`

41922 passed, 850 skipped


Merge workflow run.

@yury-s yury-s merged commit 561bb37 into microsoft:main May 18, 2026
41 of 44 checks passed
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]: Configurable last-run file location for improved CI shard use

2 participants