feat(test-runner): read last failed tests from --last-failed=<file> - #42995
Pavel Feldman (pavelfeldman) merged 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
|
Hi, I'm the Playwright bot and I took a first look at the CI failures here. 🟡 The two VS Code extension failures are probably not caused by this PR, but I couldn't prove they're flakesBoth failures are DetailsBesides the two failures, the report has 5 flaky tests (passed on retry), and they're in areas this PR doesn't touch. The two real failures come from the Uncertain
Triaged by the Playwright bot - agent run |
This comment has been minimized.
This comment has been minimized.
| ['--last-failed', { description: `Only re-run the failures` }], | ||
| ['--last-failed-file <file>', { description: `Override the default path for the last-run JSON file used with --last-failed (default: <outputDir>/.last-run.json). Same as PLAYWRIGHT_LAST_RUN_OUTPUT_FILE environment variable.` }], | ||
| ['--last-failed [file]', { description: `Only re-run the failures. Optionally takes a path to the last-run JSON file to read the failures from, use --last-failed=<file> form (default: the file last run is written to)` }], | ||
| ['--last-failed-file <file>', { description: `Path to write the last-run JSON file to (default: <outputDir>/.last-run.json). Same as PLAYWRIGHT_LAST_RUN_OUTPUT_FILE environment variable.` }], |
There was a problem hiding this comment.
--last-failed-output-file to disambiguate
| return undefined; | ||
| try { | ||
| const lastRunInfo = JSON.parse(await fs.promises.readFile(this._lastRunFile, 'utf8')) as LastRunInfo; | ||
| const lastRunInfo = JSON.parse(await fs.promises.readFile(this._outputFile, 'utf8')) as LastRunInfo; |
There was a problem hiding this comment.
Why not call readFailedTests() here?
There was a problem hiding this comment.
This is gone now
`--last-failed=<file>` reads the failures from the given last run file and never writes to it. The run fails when that file is missing or malformed. Without a path, `--last-failed` reads `<outputDir>/.last-run.json`. `--last-failed-file` is renamed to `--last-run-output-file` and only controls where the last run file is written, same as `PLAYWRIGHT_LAST_RUN_OUTPUT_FILE`. Relative paths are resolved against the current working directory.
6d8233b to
32cb420
Compare
3456aa7
into
microsoft:main
Test results for "tests 1"5 flaky52401 passed, 1243 skipped Merge workflow run. |
Test results for "MCP"2 failed 8827 passed, 1480 skipped Merge workflow run. |
|
Hi, I'm the Playwright bot and I took a first look at the CI failures here. 🟢 The two MCP Firefox failures are pre-existing flakesBoth tests fail intermittently on DetailsThe latest MCP run at Pre-existing flake / infra
Triaged by the Playwright bot - agent run |
Summary
--last-failed=<file>reads the failures from the given last run file and never writes to it; the run fails if the file is missing or malformed. Without a path,--last-failedreads<outputDir>/.last-run.json.--last-failed-fileis renamed to--last-run-output-file. It only controls where the last run file is written, same asPLAYWRIGHT_LAST_RUN_OUTPUT_FILE.