Skip to content

fix(test): record a separate video for each test and page - #43980

Open
Pavel Feldman (pavelfeldman) wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:fix-43915
Open

Pavel Feldman (pavelfeldman) wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:fix-43915

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • Test fixtures start and stop the screencast video for every page during the test, instead of using the recordVideo context option. Pages created in beforeAll and shared between tests get a video per test, and pages closed during the test keep their video.
  • Screencast.stop() saves the video when the page is already closed, as long as the context is open.
  • Scale screencast frames down when another client, such as tracing, captures them larger than the video size.
  • page.video() is no longer available for fixture pages; videos are attached to the test results instead.

Supersedes #43924.

Fixes #43915

Test fixtures now start and stop the screencast video for every page
during the test, instead of using the recordVideo context option.
This covers pages that are created in beforeAll and shared between tests.

Fixes: microsoft#43915
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

1 failed
❌ [playwright-test] › fixture-errors.spec.ts:746 › should not continue with scope teardown after fixture teardown timeout @playwright-x64-ubuntu24-64-core-node22

2 flaky ⚠️ [chromium-library] › library/chromium/connect-over-cdp.spec.ts:28 › CD-001 should connect to an existing cdp session `@chromium-playwright-x64-ubuntu24-64-core-node22`
⚠️ [chromium-library] › library/video.spec.ts:356 › screencast › VI-014 should work for popups `@chromium-playwright-x64-ubuntu24-64-core-node22`

23608 passed, 705 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🟢 The failure is a pre-existing flake

Hi, I'm the Playwright bot. I compared the latest CI report with this PR and the refreshed test history.

Details

The only failed test has an identical failure on main before this PR. It is unlikely to be caused by #43980.

Pre-existing flake

[playwright-test] › fixture-errors.spec.ts:746 › should not continue with scope teardown after fixture teardown timeout — failed on Ubuntu 24 / Node 22 in the PR run, testing PR head 1784a377f45f.

The same test, on the same CI runner, failed in a main-branch run on October 28, at commit 148474f635bd. Both errors are identical: output unexpectedly includes in fixture teardown after fixture2 exceeds its 1,000 ms teardown timeout. In the refreshed database, this test failed 1 of 665 independent run attempts and passed the other 664 on that runner, from October 13 through November 6, excluding #43980 and its predecessor #43924.

The PR changes shared artifact fixtures, but this test enables tracing only, leaves video off, and creates no browser pages. The test and fixture teardown scheduler are unchanged. The earlier identical failure is the evidence for the flake verdict.

The report's two other tests passed on retry; neither is a remaining failure.

CI failures assessed by the Playwright bot - agent run

Triaged by the Playwright bot - agent run

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

5194 passed, 616 skipped


Merge workflow run.

This branch has not been deployed

No deployments
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.

[Bug]: Videos are not generated when reusing a single page between tests

2 participants