Skip to content

fix(ios): driver keeps no XCTest attachments (keepNever) - #2

Merged
jochen-testingbot merged 1 commit into
tb-modsfrom
fix/ios-driver-attachments-keepnever
Oct 26, 2026
Merged

jochen-testingbot merged 1 commit into
tb-modsfrom
fix/ios-driver-attachments-keepnever

Conversation

@jochen-testingbot

Copy link
Copy Markdown
Collaborator

What

  • Scheme: the maestro-driver-ios scheme's TestAction now sets systemAttachmentLifetime = "keepNever" and userAttachmentLifetime = "keepNever".
  • Templates: the two checked-in maestro-driver-ios-config.xctestrun templates (driver-iphoneos, driver-iPhoneSimulator) are set to match. build-maestro-ios-runner.sh regenerates them from the build anyway.

Why

The runner's single test never succeeds, because Maestro stops it at session end. So the default deleteOnSuccess kept every screenshot XCTest took while Maestro polled the screen.

On real iPhones those screenshots stay in testmanagerd's data container. Nothing on the host can delete them:

  • devicectl has no delete
  • CoreDevice remove-file is refused at the container root
  • the testmanagerd DTX delete only works on the live session's attachments

Measured on the TestingBot fleet (2026-10-26):

  • iPhone 17 Pro Max: +238 full-size PNGs (1320×2868, ~260 KB) in 60 s during one Maestro session, and ~2,900 that day, in two bursts that line up exactly with the two Maestro sessions
  • iPhone 15: 93 GB of attachments, with 2 GB actually free

Verified

All three build paths run xcodebuild build-for-testing -scheme maestro-driver-ios, so they all pick this up: the physical-driver workflow, build-maestro-ios-runner.sh, and DriverBuilder.

A local simulator build-for-testing (Xcode 26.4) now emits:

SystemAttachmentLifetime = keepNever
UserAttachmentLifetime = keepNever

Both templates pass plutil -lint.

After merge

  1. Run Build Physical iOS Drivers (workflow_dispatch).
  2. Publish the ios18 and ios26 zips as maestro-iphoneos-driver-build-ios18.zip and -ios26.zip.
  3. The vm's Maestro cache is keyed on the zip's ETag, so guests pick up the new build on their next session.

Until then, testingbot/vm#178 patches the copied .xctestrun at install time.

The runner's one test never succeeds - Maestro stops it at session end - so
the scheme's default deleteOnSuccess kept every screenshot XCTest took while
Maestro polled the screen. On a real iPhone they stay in testmanagerd's data
container, where nothing on the host can delete them: +238 full-size PNGs
in 60 s during one Maestro session on an iPhone 17 Pro Max, ~2,900 that
day, and 93 GB of attachments filling an iPhone 15.

Set systemAttachmentLifetime/userAttachmentLifetime = keepNever on the
scheme's TestAction, which build-for-testing writes into the .xctestrun
(checked: a simulator build-for-testing now emits keepNever for both), and
in the checked-in config xctestrun templates.
@jochen-testingbot
jochen-testingbot merged commit 632fe6e into tb-mods Oct 26, 2026
6 of 11 checks passed
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.

1 participant