Add screen_capture_format attribute to ios_xctestrun_runner #3021
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 287 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.339
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3021"
general
weight: 0.35
erneestoc
Summary
Adds a new
screen_capture_formatstring attribute toios_xctestrun_runnerthat threads Xcode'sPreferredScreenCaptureFormatxctestrun key (added in Xcode 15) into the generated file. Accepted values:""(default): key is not written, so Xcode's platform default is used — no behavior change for existing users."screenshots": capture screenshots only."screenRecording": capture a full screen recording of each UI test run, attached to the resulting.xcresultbundle.The same value can be set ad hoc for a single run without editing the runner target via
--test_arg=--xctestrun_screen_capture_format=<value>.Setting a non-empty value implies:
1. Use of
xcodebuild test-without-building(the directxctestpath does not read the xctestrun file).2.
create_xcresult_bundle = True(the capture is only observable in the.xcresult).Both are documented on the attribute and echoed as
note:lines when triggered, matching the existingattachment_lifetime/xcodebuild_argsconventions.Interaction with
attachment_lifetimeScreen captures are system attachments, so
attachment_lifetimemust be"keepAlways"or"deleteOnSuccess"for the capture to survive into the.xcresult— the default"keepNever"discards it. This is called out in the attribute doc, and the runner emits awarning:at runtime when a capture format is requested while the lifetime is"keepNever".Test plan
//test:ios_xctestrun_runner_ui_test— 2 new template-emission cases:-
test_ios_ui_test_default_screen_capture_format_arg— assertsPreferredScreenCaptureFormatis not emitted when the flag is unset.-
test_ios_ui_test_screen_capture_format_arg— asserts the key +screenRecordingvalue +SystemAttachmentLifetime=keepAlwaysare all written when both flags are set.//doc:check_iospasses with regenerateddoc/rules-ios.md.buildifier --lint=warnpasses clean..xcresultproduced and opens in Xcode with the.movvideo attachment visible in the Attachments panel.test_ios_ui_test_passandtest_ios_ui_test_attachment_lifetime_argpass.