Repository navigation
refactor(e2e): split the session half of a worker from the runner - #1736
Conversation
🟢 e2e web: 93 passedAll 93 tests in 42 files
Tested by e2e 0.23.1 · 59.1s · web · run artifacts |
There was a problem hiding this comment.
All reported issues were addressed across 83 files
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Turn on auto-fix | Re-trigger cubic
🟢 e2e web agent: 34 passed35 agent steps · 26 replayed from cache · 25 model calls · 117.1k tokens (87% cached) · $0.0065 All 34 tests in 5 files
Tested by e2e 0.23.1 · 1m 35s · web · run artifacts |
🟢 e2e ios agent: 1 flaky, 20 passed, 1 skipped25 agent steps · 12 replayed from cache · 57 model calls · 52.0k tokens (85% cached) · $0.0033
|
| Test | Agent | Time | |
|---|---|---|---|
| tests-agent/scenarios.e2e.ts · 1 flaky, 20 passed, 1 skipped | 25 steps · 57 calls | 8m 43s | |
| 🟢 | act completes Login Form | 1 step | 41.0s |
| 🟢 | act completes Infinite Scroll List | 1 step | 39.1s |
| 🟢 | act completes Modal Flow | 1 step | 11.4s |
| 🟢 | act completes Bottom Tabs | 1 step | 8.4s |
| 🟢 | act completes Text Input Variations | 1 step | 14.7s |
| 🟢 | act completes Broken Accessibility | 2 steps · 6 calls | 30.6s |
| 🟢 | act completes Vision Only | 2 steps · 6 calls | 27.9s |
| act completes Gestures (2 failed attempts first) | 1 step · 9 calls | 42.5s | |
| 🟢 | act completes Async States | 1 step · 9 calls | 35.5s |
| 🟢 | act completes Debounced Search | 1 step · 1 call | 27.8s |
| 🟢 | act completes Flattened Registration Form | 2 steps · 1 call | 26.8s |
| 🟢 | act completes Flattened Login | 2 steps · 11 calls | 58.2s |
| 🟢 | act completes Sticky Chrome Target | 1 step | 13.0s |
| 🟢 | act completes WebView Accessibility | 1 step | 12.2s |
| 🟢 | act completes Permission Prompt | 1 step | 11.7s |
| 🟢 | act completes Photo Picker | 1 step · 2 calls | 27.7s |
| 🟢 | act completes Product Catalog | 1 step | 10.2s |
| 🟢 | act completes Error Recovery | 1 step | 9.6s |
| 🟢 | act completes Choice Controls | 1 step · 5 calls | 33.9s |
| 🟢 | act completes Stripe PaymentSheet | 1 step · 7 calls | 28.9s |
| 🟢 | act completes Apple Pay | 1 step | 11.7s |
| ⏭️ | 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.23.1 · 10m 12s · ios-simulator · run artifacts
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Turn on auto-fix | Re-trigger cubic
🟢 e2e android agent: 20 passed24 agent steps · 15 replayed from cache · 50 model calls · 319.8k tokens (84% cached) · $0.0202 All 20 tests in 1 file
Tested by e2e 0.23.1 · 6m 4s · android-emulator · run artifacts |
🟢 e2e ios: 1 flaky, 55 passed, 1 skipped
|
| Test | Time | |
|---|---|---|
| tests/device-fixture.e2e.ts · 1 flaky, 11 passed | 2m 12s | |
| 🟢 | device fixture › setAppearance flips the color scheme the app reads | 14.3s |
| 🟢 | device fixture › setOrientation rotates the window the app measures | 8.1s |
| 🟢 | device fixture › the clipboard reads back what was written | 8.7s |
| 🟢 | device fixture › home leaves the app, openApp brings it back where it was | 8.2s |
| 🟢 | device fixture › closeApp then openApp relaunches on the home list | 16.1s |
| 🟢 | device fixture › closeApp leaves the next commands on the same device | 24.6s |
| 🟢 | device fixture › foregroundApp after closeApp reports the closed session as APP_NOT_OPEN | 9.7s |
| device fixture › openLink opens the scenario a deep link names (1 failed attempt first) | 6.5s | |
| 🟢 | device fixture › device.back pops the scenario | 7.9s |
| 🟢 | device fixture › unstable_raw reaches the test session through the raw driver | 5.1s |
| 🟢 | device fixture › setLocation and clearLocation change what the app reads | 11.6s |
| 🟢 | device fixture › enrollBiometrics and setBiometrics answer a biometric prompt | 11.4s |
| ⏭️ | tests/controls.e2e.ts · 23 passed, 1 skipped | 3m 30s |
| 🟢 | control inventory › a label query resolves a labeled text field | 13.5s |
| 🟢 | control inventory › a labeled field answers name, display value, value reads, fill, and clear | 17.4s |
| 🟢 | control inventory › a placeholder query and attribute reads find the field | 6.2s |
| 🟢 | control inventory › a secure field takes a fill and denies value reads | 12.2s |
| 🟢 | control inventory › press sends a character and Enter through the soft keyboard | 11.8s |
| 🟢 | control inventory › a field autofocuses on mount and focus() moves the focus | 18.3s |
| 🟢 | control inventory › toBeFocused follows the focus | 10.7s |
| 🟢 | control inventory › a switch checks, unchecks, and reports its state | 13.9s |
| 🟢 | control inventory › checkbox and radio roles answer getByRole, and a checkbox toggles by tap | 9.8s |
| 🟢 | control inventory › checkbox and radio roles check, uncheck, and report their state | 13.9s |
| 🟢 | control inventory › a radio group reports the checked option | 9.5s |
| 🟢 | 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 | 8.0s |
| 🟢 | control inventory › a header answers its accessible name | 4.5s |
| 🟢 | control inventory › a tab row answers count, all, texts, filters, positions, and switching | 7.1s |
| 🟢 | control inventory › a list answers counts, list-form text, reads, and boxes in order | 6.9s |
| ⏭️ | 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 | 9.0s |
| 🟢 | control inventory › pointer verbs land at the point asked for | 10.0s |
| 🟢 | control inventory › an ambiguous locator fails at once | 5.6s |
| 🟢 | control inventory › screenshot, restart, and clearState reopen the app on its home list | 11.9s |
| 🟢 | refusals › verbs a device never declares are refused before the engine | 2ms |
| 🟢 | refusals › keys the soft keyboard cannot send are refused by the engine | 588ms |
| 🟢 | refusals › a missing locator fails as not found once its timeout passes | 1.1s |
| 🟢 | tests/device.e2e.ts · 3 passed | 49.8s |
| 🟢 | sequential onboarding echoes the exact values | 27.9s |
| 🟢 | onboarding rejects a malformed email before advancing | 10.3s |
| 🟢 | dismissing the keyboard over choice controls leaves them as they were | 11.6s |
| 🟢 | tests/flows-lists.e2e.ts · 7 passed | 4m 7s |
| 🟢 | infinite scroll reaches the target item | 36.4s |
| 🟢 | product catalog adds exactly two of the right variant | 10.7s |
| 🟢 | gestures: long-press, then swipe left | 8.7s |
| 🟢 | sticky chrome: accept below the fold, then continue | 12.7s |
| 🟢 | async states: load, pull to refresh, claim through the toast | 11.6s |
| 🟢 | huge virtualized list reaches row 512 | 2m 34s |
| 🟢 | web view coupon form applies the code shown on the page | 12.1s |
| 🟢 | tests/flows.e2e.ts · 7 passed | 1m 9s |
| 🟢 | text inputs unlock the submit button | 12.5s |
| 🟢 | filled text inputs report their values | 10.4s |
| 🟢 | modal flow confirms through the native alert | 9.6s |
| 🟢 | bottom tabs act inside the last tab | 7.6s |
| 🟢 | error recovery retries, then confirms the delete | 9.3s |
| 🟢 | choice controls place the exact order | 7.6s |
| 🟢 | debounced search selects the target once results arrive | 11.5s |
| 🟢 | tests/login-form.e2e.ts · 3 passed | 45.3s |
| 🟢 | login form › rejects a malformed email | 13.2s |
| 🟢 | login form › rejects an unknown account | 12.9s |
| 🟢 | login form › signs in and logs out | 19.3s |
| 🟢 | tests/smoke.e2e.ts · 1 passed | 8.3s |
| 🟢 | home lists the scenarios and opens one | 8.3s |
Tested by e2e 0.23.1 · 7m 34s · ios-simulator · run artifacts
🟢 e2e android: 58 passed, 1 skippedAll 59 tests in 7 files
Tested by e2e 0.23.1 · 8m 29s · android-emulator · run artifacts |
30260b5 to
451cc49
Compare
TargetExecutor's engine init, dispose, and per-attempt session launch and close move to an EngineSessions base class. The standalone worker takes a WorkerPolicy and an AttemptPolicy per kind; the hosted and one-shot kinds live in standalone-kinds.ts. resolveProjectConfig resolves what is not reporters or test filters, which resolveConfig in config/resolve-run.ts adds, with their types in run-types.ts. No behavior changes: this is the seam the next change moves into a package of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
collect/select.ts read it from run/provision.ts, which loads app processes and engine provisioning; internal/recording-modes.ts already holds the modes it resolves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
451cc49 to
7dd8ace
Compare
Stack 1/3: this PR → move into
@e2e-dev/core→@e2e-dev/coreAPI.A refactor inside
packages/e2ewith no behavior change. It separates the half of a worker that drives an engine from the half that runs tests, so the next PR can move the first half into its own package.flowchart LR subgraph engine["session half (moves to @e2e-dev/core in 2/3)"] ES["EngineSessions<br/>engine init and dispose,<br/>attempt launch and close"] W["openWorker + WorkerPolicy"] A["launchAttempt + AttemptPolicy"] P["resolveProjectConfig"] end subgraph runner["runner half (stays in e2e)"] TE["TargetExecutor"] K["standalone-kinds.ts<br/>hosted, one-shot"] R["resolveConfig<br/>reporters, filters"] end TE -- extends --> ES K -- policy --> W K -- policy --> A R -- over --> Prun/engine-sessions.ts:EngineSessionstakes engine init and dispose, and each attempt's session from launch to close, out ofTargetExecutor, which now extends it.run/standalone.tsandrun/standalone-attempt.ts: the standalone worker takes aWorkerPolicy(who claims the engine, what runs its sessions) and anAttemptPolicy(identity,reserve,launched,closedhooks). The hosted (openHost) and one-shot (MCP) kinds move torun/standalone-kinds.ts, with the publication, soft failures, and host trace they own.resolveProjectConfig(config/resolve.ts) resolves everything but reporters and test filters.resolveConfigin the newconfig/resolve-run.tsadds those on top.ProjectConfig(types.ts) isE2EConfigwithoutreportersandfilters.E2EConfig,Report,Reporter, and the filter types move tosrc/run-types.ts.e2eexportsProjectConfig(changeset).describeTarget→run/provision.ts,TestIdentity/SkipInfo→run/records.ts, andpairRecording→internal/recording-modes.ts, so the session side never importscollect/.Verified
Ran it locally: yes. A refactor shows no behavior on screen, so the evidence is the existing suites, unchanged, against the built packages:
pnpm test: e2e 4624 passed (unit and integration), web 810, mobile 531, every other package green.pnpm --filter @e2e-dev/testbed test): 588 passed, 1 skipped.pnpm checkpasses.🤖 Generated with Claude Code