Skip to content

feat(eas): install the target's local build on Expo simulators - #2224

Merged
okwasniewski merged 2 commits into
mainfrom
oskar/eas-install-app-path
Nov 25, 2026
Merged

okwasniewski merged 2 commits into
mainfrom
oskar/eas-install-app-path

Conversation

@okwasniewski

@okwasniewski okwasniewski commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

What

expoSimulators() installs a local build itself. With no buildId or applicationArchiveUrl, the target's app.appPath is uploaded to each simulator and installed before the first test, as revyl(), limrun() and e2b() already do.

{
  name: 'android-eas',
  engine: mobile({ platform: 'android', device: expoSimulators() }),
  app: { appPath: './build/app-release.apk' },
}

@e2e-dev/mobile/lease exports installLeasedApp(request, lease) for any device provider whose devices start without the build.

Why

Expo Simulators was the one hosted provider where a local build needed a suite fixture calling device.installApp(). The same config on Revyl, Limrun or E2B installs the build in the provider (#1947 for Revyl). A suite that moves between them should not need a different fixture.

How it works

  1. installLeasedApp() (packages/mobile/src/lease/index.ts:159) is feat(revyl): install local builds on Revyl devices #1947's private install helper, exported and widened: it takes a DeviceLease, connects to lease.daemon when the lease names one and to the lease's stateDir otherwise, selects lease.device or lease.deviceId, and returns the lease with installedApp. Without an appPath it returns the lease as it is. agentDeviceLeases({ installAppPath }) calls it.
  2. expoSimulators().acquire (packages/eas/src/provider.ts:203) returns installLeasedApp(request, lease) once the session is ready. The engine then opens the app in warm-up and installs nothing itself.
  3. A failed install goes through the same abandon() as a session that never became ready (packages/eas/src/provider.ts:179): it drops the session's idle deadline and stored client, stops the session, and throws simulator session <id> did not install the target's app.appPath: <reason>.
  4. deviceSelection and DeviceSelection move from pool.ts to bindings.ts, so the lease entry reuses the engine's selection rule without loading the device pool.
  5. installedIdentity() takes the fix to name in its no-identity error. A provider install names app.bundleId only; device.installApp() keeps installApp's app option, which the lease path does not have (review thread on feat(revyl): install local builds on Revyl devices #1947).
  6. @e2e-dev/eas now needs @e2e-dev/mobile >=0.12.9, the release that carries the helper. The guard for a mobile that passes no projectRoot is older than that floor and is removed.

Dropped: making device.installApp() skip a build the provider installed. The lease's installedApp goes stale after an upgrade test installs an older build, or when a replaced worker starts on a device a test uninstalled from, so the skip could leave the wrong build on the device. device.installApp() installs as before, and the docs tell EAS users to remove the fixture. A sound skip needs the device's own build identity and is a separate change.

Not in this PR: e2b() and limrun() keep their own copies of the install. Moving them to installLeasedApp() raises their mobile peer floor, so it is a follow-up.

Verified

Ran it locally: yes, on a live Expo Simulators Android session at this head.

  • Scratch project with expoSimulators({ projectId }), app: { appPath: '<mobile-benchmark app-release.apk>' }, no bundleId, no install fixture. e2e run: the warm-up opened the app the provider installed, the test saw device.isAppInstalled('dev.e2e.benchmark') and the home screen, and the session was released.
ℹ leasing 1 android device(s) from expo-simulators
ℹ expo-simulators: leased 01a20edb-26b7-74ca-b8cb-2967a891fc8a
ℹ a booted android device: boot 0.4s, open dev.e2e.benchmark 1.4s
 ✓ mobile engine for target "android-eas" prepared 125.54s
   ✓ |android-eas| tests/install.e2e.ts > the provider installed the local build 3.49s
ℹ expo-simulators: released 1 device(s)
  • Mutants in installLeasedApp(): an empty daemon URL in place of the lease's, and platform alone in place of the device selection, each fail the new lease test.
  • Not run: iOS on Expo Simulators (a local Xcode 27 build crashes at launch there), and the install-failure path against a live session, which the unit test covers.
  • No benchmark: the engine's action path is unchanged.

View guided diff Turn on auto-fix

expoSimulators() installs app.appPath through the session's daemon with installLeasedApp(), a helper @e2e-dev/mobile/lease now exports. device.installApp() skips the target's build when the device provider already installed it, so one install fixture serves local and hosted devices.
A lease's installedApp goes stale after an upgrade install or a worker replacement, so device.installApp() installs as before. deviceSelection moves to bindings.ts so the lease entry does not load the pool. The no-identity error names the fix that applies to its caller.
@github-actions github-actions Bot added e2e team Opened by the e2e team size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile labels Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🟢 e2e android agent: 20 passed

24 agent steps · 15 replayed from cache · 38 model calls · 231.1k tokens (88% cached) · $0.0125

All 20 tests in 1 file
Test Agent Time
🟢 tests-agent/scenarios.e2e.ts · 20 passed 24 steps · 38 calls 5m 48s
🟢 act completes Login Form 1 step 23.9s
🟢 act completes Infinite Scroll List 1 step 20.7s
🟢 act completes Modal Flow 1 step 12.7s
🟢 act completes Bottom Tabs 1 step 7.7s
🟢 act completes Text Input Variations 1 step 6.9s
🟢 act completes Broken Accessibility 2 steps · 5 calls 13.6s
🟢 act completes Vision Only 2 steps · 1 call 6.6s
🟢 act completes Gestures 1 step · 9 calls 21.7s
🟢 act completes Async States 1 step · 11 calls 27.1s
🟢 act completes Debounced Search 1 step 6.9s
🟢 act completes Huge Virtualized List 1 step 1m 52s
🟢 act completes Flattened Registration Form 2 steps · 1 call 8.2s
🟢 act completes Flattened Login 2 steps · 6 calls 14.5s
🟢 act completes Sticky Chrome Target 1 step 9.1s
🟢 act completes WebView Accessibility 1 step · 5 calls 14.1s
🟢 act completes Permission Prompt 1 step 6.5s
🟢 act completes Product Catalog 1 step 7.8s
🟢 act completes Error Recovery 1 step 9.2s
🟢 act completes Choice Controls 1 step 8.8s
🟢 act completes Sequential Onboarding 1 step 10.1s

Tested by e2e 0.24.0 · 5m 49s · android-emulator · run artifacts

@github-actions

Copy link
Copy Markdown
Contributor

🟢 e2e ios: 61 passed, 1 skipped

All 62 tests in 7 files
Test Time
⏭️ tests/controls.e2e.ts · 24 passed, 1 skipped 3m 21s
🟢 control inventory › a label query resolves a labeled text field 14.5s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 17.2s
🟢 control inventory › a placeholder query and attribute reads find the field 5.2s
🟢 control inventory › a secure field takes a fill and denies value reads 9.7s
🟢 control inventory › press sends a character and Enter through the soft keyboard 9.9s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 11.1s
🟢 control inventory › toBeFocused follows the focus 9.7s
🟢 control inventory › a switch checks, unchecks, and reports its state 11.2s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 9.6s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 13.6s
🟢 control inventory › a radio group reports the checked option 9.6s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 8.1s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 7.8s
🟢 control inventory › a header answers its accessible name 4.7s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 7.0s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 6.6s
⏭️ control inventory › a row contains its texts (skipped: React Native flattens a plain View out of the accessibility tree on both platforms: XCTest and the Android helper report a View with a testID as a leaf beside its children, so filter({ has }) and a query scoped to it match nothing; only Sc…)
🟢 control inventory › a long press lands as one 8.2s
🟢 control inventory › tap({ count: 3 }) lands three presses 8.4s
🟢 control inventory › pointer verbs land at the point asked for 9.4s
🟢 control inventory › an ambiguous locator fails at once 5.7s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 12.7s
🟢 refusals › verbs a device never declares are refused before the engine 3ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 197ms
🟢 refusals › a missing locator fails as not found once its timeout passes 1.1s
🟢 tests/device-fixture.e2e.ts · 14 passed 2m 22s
🟢 device fixture › setAppearance flips the color scheme the app reads 14.0s
🟢 device fixture › setOrientation rotates the window and viewport dimensions 8.7s
🟢 device fixture › the clipboard reads back what was written 6.8s
🟢 device fixture › home leaves the app, openApp brings it back where it was 8.6s
🟢 device fixture › closeApp then openApp relaunches on the home list 11.0s
🟢 device fixture › closeApp leaves the next commands on the same device 15.3s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 6.6s
🟢 device fixture › openLink opens the scenario a deep link names 17.5s
🟢 device fixture › isAppInstalled finds the app under test and no app that is absent 7.7s
🟢 device fixture › uninstallApp removes the app until installApp puts it back 10.5s
🟢 device fixture › device.back pops the scenario 7.1s
🟢 device fixture › unstable_raw reaches the test session through the raw driver 5.0s
🟢 device fixture › setLocation and clearLocation change what the app reads 11.1s
🟢 device fixture › enrollBiometrics and setBiometrics answer a biometric prompt 11.9s
🟢 tests/device.e2e.ts · 5 passed 58.9s
🟢 sequential onboarding echoes the exact values 25.7s
🟢 isKeyboardShown follows the keyboard up and through a dismissal 7.5s
🟢 a shake is sent without an error and leaves the screen readable 4.7s
🟢 onboarding rejects a malformed email before advancing 9.8s
🟢 dismissing the keyboard over choice controls leaves them as they were 11.1s
🟢 tests/flows-lists.e2e.ts · 7 passed 4m 5s
🟢 infinite scroll reaches the target item 33.9s
🟢 product catalog adds exactly two of the right variant 10.4s
🟢 gestures: long-press, then swipe left 9.0s
🟢 sticky chrome: accept below the fold, then continue 12.7s
🟢 async states: load, pull to refresh, claim through the toast 11.8s
🟢 huge virtualized list reaches row 512 2m 36s
🟢 web view coupon form applies the code shown on the page 11.7s
🟢 tests/flows.e2e.ts · 7 passed 1m 9s
🟢 text inputs unlock the submit button 12.6s
🟢 filled text inputs report their values 10.2s
🟢 modal flow confirms through the native alert 9.6s
🟢 bottom tabs act inside the last tab 7.4s
🟢 error recovery retries, then confirms the delete 9.5s
🟢 choice controls place the exact order 7.7s
🟢 debounced search selects the target once results arrive 11.5s
🟢 tests/login-form.e2e.ts · 3 passed 44.4s
🟢 login form › rejects a malformed email 12.9s
🟢 login form › rejects an unknown account 12.8s
🟢 login form › signs in and logs out 18.7s
🟢 tests/smoke.e2e.ts · 1 passed 7.9s
🟢 home lists the scenarios and opens one 7.9s

Tested by e2e 0.24.0 · 7m 28s · ios-simulator · run artifacts

@github-actions

Copy link
Copy Markdown
Contributor

🟢 e2e ios agent: 21 passed, 1 skipped

25 agent steps · 12 replayed from cache · 60 model calls · 484.8k tokens (81% cached) · $0.0336

All 22 tests in 1 file
Test Agent Time
⏭️ tests-agent/scenarios.e2e.ts · 21 passed, 1 skipped 25 steps · 60 calls 8m 41s
🟢 act completes Login Form 1 step 43.7s
🟢 act completes Infinite Scroll List 1 step 39.9s
🟢 act completes Modal Flow 1 step 11.9s
🟢 act completes Bottom Tabs 1 step 8.5s
🟢 act completes Text Input Variations 1 step 14.5s
🟢 act completes Broken Accessibility 2 steps · 5 calls 24.0s
🟢 act completes Vision Only 2 steps · 6 calls 26.6s
🟢 act completes Gestures 1 step · 5 calls 19.3s
🟢 act completes Async States 1 step · 9 calls 30.0s
🟢 act completes Debounced Search 1 step · 1 call 28.4s
🟢 act completes Flattened Registration Form 2 steps · 1 call 25.4s
🟢 act completes Flattened Login 2 steps · 17 calls 1m 29s
🟢 act completes Sticky Chrome Target 1 step 13.2s
🟢 act completes WebView Accessibility 1 step 12.4s
🟢 act completes Permission Prompt 1 step 11.7s
🟢 act completes Photo Picker 1 step · 2 calls 27.6s
🟢 act completes Product Catalog 1 step 10.3s
🟢 act completes Error Recovery 1 step 9.8s
🟢 act completes Choice Controls 1 step · 5 calls 33.6s
🟢 act completes Stripe PaymentSheet 1 step · 9 calls 30.5s
🟢 act completes Apple Pay 1 step 10.9s
⏭️ act completes Apple Pay Billing Address (skipped: the CI simulator's Apple Pay sheet skips the billing-address step, so the scenario cannot be completed there)

Tested by e2e 0.24.0 · 8m 43s · ios-simulator · run artifacts

@github-actions

Copy link
Copy Markdown
Contributor

🟢 e2e android: 1 flaky, 61 passed, 1 skipped

⚠️ 1 flaky test passed on a retry

⚠️ control inventory › a label query resolves a labeled text field
tests/fixtures.ts:61

ACTION_FAILED (beforeEach) at step 3 of 3: expect.toBeVisible getByLabel("Control Inventory. "), after 5.0s

operation timed out: getByLabel("Control Inventory. ")

  • Screen: dev.e2e.benchmark

Evidence: screenshot, log

All 63 tests in 7 files
Test Time
⚠️ tests/controls.e2e.ts · 1 flaky, 24 passed, 1 skipped 3m 2s
⚠️ control inventory › a label query resolves a labeled text field (1 failed attempt first) 9.3s
🟢 control inventory › a labeled field answers name, display value, value reads, fill, and clear 14.3s
🟢 control inventory › a placeholder query and attribute reads find the field 6.9s
🟢 control inventory › a secure field takes a fill and denies value reads 8.6s
🟢 control inventory › press sends a character and Enter through the soft keyboard 8.7s
🟢 control inventory › a field autofocuses on mount and focus() moves the focus 8.3s
🟢 control inventory › toBeFocused follows the focus 9.5s
🟢 control inventory › a switch checks, unchecks, and reports its state 10.7s
🟢 control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap 7.7s
🟢 control inventory › checkbox and radio roles check, uncheck, and report their state 13.3s
🟢 control inventory › a tab role answers getByRole 4.7s
🟢 control inventory › a radio group reports the checked option 8.8s
🟢 control inventory › buttons report disabled, enabled, and a state that arrives later 8.2s
🟢 control inventory › a display: none element is absent rather than hidden, its visible twin attached 7.4s
🟢 control inventory › a header answers its accessible name 4.3s
🟢 control inventory › a tab row answers count, all, texts, filters, positions, and switching 5.4s
🟢 control inventory › a list answers counts, list-form text, reads, and boxes in order 6.2s
⏭️ control inventory › a row contains its texts (skipped: React Native flattens a plain View out of the accessibility tree on both platforms: XCTest and the Android helper report a View with a testID as a leaf beside its children, so filter({ has }) and a query scoped to it match nothing; only Sc…)
🟢 control inventory › a long press lands as one 8.0s
🟢 control inventory › a double tap lands inside the 300 ms window 7.6s
🟢 control inventory › tap({ count: 3 }) lands three presses 7.4s
🟢 control inventory › an ambiguous locator fails at once 5.2s
🟢 control inventory › screenshot, restart, and clearState reopen the app on its home list 8.8s
🟢 refusals › verbs a device never declares are refused before the engine 4ms
🟢 refusals › keys the soft keyboard cannot send are refused by the engine 1.2s
🟢 refusals › a missing locator fails as not found once its timeout passes 1.1s
🟢 tests/device-fixture.e2e.ts · 13 passed 1m 42s
🟢 device fixture › setOrientation rotates the window and viewport dimensions 6.9s
🟢 device fixture › home leaves the app, openApp brings it back where it was 6.3s
🟢 device fixture › foregroundApp sees the home screen after home() 5.2s
🟢 device fixture › closeApp then openApp relaunches on the home list 8.2s
🟢 device fixture › closeApp leaves the next commands on the same device 8.1s
🟢 device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN 4.6s
🟢 device fixture › openLink opens the scenario a deep link names 5.4s
🟢 device fixture › isAppInstalled finds the app under test and no app that is absent 4.5s
🟢 device fixture › uninstallApp removes the app until installApp puts it back 9.5s
🟢 device fixture › device.back pops the scenario 4.8s
🟢 device fixture › unstable_raw reaches the test session through the raw driver 3.8s
🟢 device fixture › setNetwork and setAirplaneMode change what the app sees 16.0s
🟢 device fixture › setLocation and clearLocation change what the app reads 18.3s
🟢 tests/device.e2e.ts · 6 passed 47.3s
🟢 permission prompt › allowing the system dialog enables the microphone 6.1s
🟢 permission prompt › a denied prompt recovers once the permission is granted outside 12.7s
🟢 sequential onboarding echoes the exact values 10.4s
🟢 a shake is sent without an error and leaves the screen readable 5.0s
🟢 onboarding rejects a malformed email before advancing 5.9s
🟢 dismissing the keyboard over choice controls leaves them as they were 7.1s
🟢 tests/flows-lists.e2e.ts · 7 passed 3m 17s
🟢 infinite scroll reaches the target item 30.5s
🟢 product catalog adds exactly two of the right variant 9.4s
🟢 gestures: long-press, then swipe left 8.4s
🟢 gestures: double-tap completes the flow 10.2s
🟢 sticky chrome: accept below the fold, then continue 11.8s
🟢 async states: load, pull to refresh, claim through the toast 12.3s
🟢 huge virtualized list reaches row 512 1m 54s
🟢 tests/flows.e2e.ts · 7 passed 56.4s
🟢 text inputs unlock the submit button 6.9s
🟢 filled text inputs report their values 6.5s
🟢 modal flow confirms through the native alert 10.2s
🟢 bottom tabs act inside the last tab 7.1s
🟢 error recovery retries, then confirms the delete 9.3s
🟢 choice controls place the exact order 7.1s
🟢 debounced search selects the target once results arrive 9.3s
🟢 tests/login-form.e2e.ts · 3 passed 29.4s
🟢 login form › rejects a malformed email 8.1s
🟢 login form › rejects an unknown account 8.2s
🟢 login form › signs in and logs out 13.1s
🟢 tests/smoke.e2e.ts · 1 passed 6.8s
🟢 home lists the scenarios and opens one 6.8s

Tested by e2e 0.24.0 · 10m 55s · android-emulator · run artifacts

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 24, 2026
@okwasniewski
okwasniewski merged commit 06aa108 into main Nov 25, 2026
45 of 48 checks passed
@okwasniewski
okwasniewski deleted the oskar/eas-install-app-path branch November 25, 2026 07:45
okwasniewski pushed a commit to abhinavapasok/e2e that referenced this pull request Nov 25, 2026
- mobile and web: permissions: 'all' grants every permission the
  platform or browser can set (e2e-inc#1918)
- mobile: a DeviceProvider can install the app through the lease's
  daemon with installLeasedApp (e2e-inc#2224)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e team Opened by the e2e team Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant