cypress
cypress copied to clipboard
`experimentalWebKitSupport`: in single-tab mode, only the first spec's video is recorded
With experimentalSingleTabRunMode
and WebKit, only the first spec is recorded with video recording enabled.
This is due to how the Playwright driver records video - it requires recording to disk, and there is one file per page/context. This is in contrast with single-tab mode, where many specs run in the same page.
Some fix is needed, either by finding a better solution on the PW side, accessing the underlying WebKit RDP and using startScreencast/screencastFrame
, or chopping up the video at the end using timing data and ffmpeg, which is probably too slow.
This also seems to sometimes cause an issue where WebKit won't exit in experimentalSingleTabRunMode
. Per @astone123:
I'm enabling experimentalSingleTabRunMode for all of our packages and system tests that use CT, and I'm running into issues with running the run_ct_spec.js system test spec on Webkit. Looks like they're running correctly but then never actually exiting. When I run them locally headed, the browser opens, I see the tests run successfully, then the browser window exits (but the icon stays in my dock), and then the terminal just hangs until it hits the timeout... looks like there's something that we're not doing in single tab run mode to close the browser completely. Weird that it only happens with Webkit though.
Turning video off fixes it in this case, but it points to some other consequence of this bug I think. Here we always call videoController.restart in single-tab mode https://github.com/cypress-io/cypress/blob/3d1badc4b6fe422b0e60d07f743a24d69b6aed78/packages/server/lib/modes/run.ts#L252-L264
which is stubbed to throw an error in WK: https://github.com/cypress-io/cypress/blob/3d1badc4b6fe422b0e60d07f743a24d69b6aed78/packages/server/lib/browsers/webkit-automation.ts#L148-L150
Possibly endVideoCapture
is never called at the end of the first spec, causing an issue?
This is going to be a problem. Single Tab Run Mode makes CT way faster (up to 50%). WebKit is experimental now, but once it's not experimental, this bug is going to block Single Tab Run Mode from bcoming GA. Gating a huge perf boost isn't ideal. I wonder what the complexity of fixing this is. We should spike into it.
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
This issue has been closed due to inactivity.