ci(ios): record test videos via patrol test --record-video - #3198
Open
Kendru98 wants to merge 4 commits into
Open
ci(ios): record test videos via patrol test --record-video#3198Kendru98 wants to merge 4 commits into
patrol test --record-video#3198Kendru98 wants to merge 4 commits into
Conversation
Replace the flaky manual iOS simulator recording (a single `xcrun simctl io recordVideo` capture killed with SIGINT, then re-encoded with ffmpeg to repair the MP4) with the CLI's new `--record-video` flag, which records one MP4 per test case and finalizes each file itself. - test-ios-simulator-webview: drop the simctl+ffmpeg block, run `patrol test --record-video --video-output-dir videos`, upload the whole `videos/` dir and link it in the job summary. - test-ios-simulator: re-add recording (previously removed for flakiness) via the same flags + upload/summary steps. - WORKFLOWS.md: describe the new per-test recording flow.
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates iOS simulator CI video capture to Patrol’s per-test recording.
Changes:
- Enables
--record-videoin both iOS simulator workflows. - Uploads recordings and adds job-summary download links.
- Updates workflow documentation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/test-ios-simulator.yaml |
Adds recording and artifact upload. |
.github/workflows/test-ios-simulator-webview.yaml |
Replaces manual recording with Patrol recording. |
.github/WORKFLOWS.md |
Documents the new recording flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
On iOS simulators the app streams its `PATROL_LOG ...` lines to the simulator's unified log. patrol_cli read them with a bare host `log stream`, which on recent macOS/Xcode does not include the simulator's processes — so no `PATROL_LOG` entries arrived. The test summary showed `Total: 0` and, because per-test video recording is driven by those test lifecycle events, `--record-video` never started a recording on iOS. Read the simulator's own log with `xcrun simctl spawn <udid> log stream --type log --color none` instead (physical devices keep using `idevicesyslog`). This is the same capture the CI workflows already use successfully for their raw simulator-log artifacts.
Kendru98
force-pushed
the
ci/ios-simulator-record-video
branch
3 times, most recently
from
July 27, 2026 13:24
40786b7 to
c77756c
Compare
Two problems made `--record-video` hang the run on iOS simulators: 1. The recording process was started in a shell (`runInShell: true`), so the SIGINT used to stop it hit the shell wrapper instead of `simctl`. On CI the shell didn't forward the signal, so `simctl` kept recording and the run hung. Start the process directly so SIGINT reaches `simctl`, which finalizes the .mp4 and exits. 2. `simctl io recordVideo` takes several seconds to actually start recording. If a test fails fast, the stop-SIGINT can arrive during that startup window and be ignored, leaving the recording running forever (and holding the simulator hostage from later tests). Bound the wait for exit with a short timeout that force-kills the process, so a stuck recording can never hang the run. Mirrors the timeout the Android screenrecord manager already uses.
Kendru98
force-pushed
the
ci/ios-simulator-record-video
branch
from
July 27, 2026 13:54
c77756c to
2988ffb
Compare
Kendru98
marked this pull request as ready for review
July 27, 2026 13:55
Kendru98
requested review from
PiotrRogulski,
jBorkowska,
pdenert,
piotruela and
zoskar
as code owners
July 27, 2026 13:55
pdenert
approved these changes
Jul 31, 2026
pdenert
left a comment
Collaborator
There was a problem hiding this comment.
Do the cleanup in comments. Apart from that LGTM
- Fix webview iOS version in WORKFLOWS.md (26.0 -> 26.2). - Remove/shorten iOS log-capture and recorder comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Record iOS-simulator test videos via the CLI
--record-videoflag (#2741), replacing the flaky manualsimctl recordVideo+ffmpegcapture, plus the twopatrol_clifixes needed to make it work.Changes
test-ios-simulator+test-ios-simulator-webviewrunpatrol test … --record-video, uploadvideos/as an artifact, link it in the summary.simctl spawninstead of the hostlog stream(host stream misses simulator processes → noPATROL_LOGevents → recording never started +Total: 0summary).simctlwithout a shell soSIGINTlands, + a 10s force-kill timeout.Why the stop timeout
A fast-failing test can send the stop-
SIGINTbeforesimctlstarts recording; it's ignored,simctlruns forever and holds the simulator, hanging the whole job (hung run, ~40 min). The timeout force-kills it so it can't hang the run (as the Android recorder already does). Video is still saved.Verified
test ios simulatorgreen; webview completes without hanging and uploads videos. Remaining webview reds are pre-existing test flakiness, unrelated to recording.