Skip to content

feat: Add watchOS support to the TS driver, functional tests, and release pipeline - #1217

Open
mykola-mokhnach wants to merge 1 commit into
masterfrom
int-watch
Open

feat: Add watchOS support to the TS driver, functional tests, and release pipeline#1217
mykola-mokhnach wants to merge 1 commit into
masterfrom
int-watch

Conversation

@mykola-mokhnach

Copy link
Copy Markdown

Summary

Wires watchOS all the way through the Node/TypeScript driver, the functional test suite, and the release pipeline, building on the native watchOS support and CI (#1209, #1215, #1216) landed earlier.

Changes

TS driver (lib/)

  • isWatchOS, three-way (iOS/tvOS/watchOS) scheme, SDK, and deployment-target selection in xcodebuild.ts, a generalized bundleWDASim, and simulator-only xctestrun naming for watchOS.
  • Real watchOS device requests now throw a clear error at WebDriverAgent construction time — watchOS is simulator-only, there's no real-device WDA distribution/testing story for it.

Functional tests

  • Rewritten to assume the CI workflow (or the developer, locally) has already booted and settled the target simulator — no more per-test simulator create/boot/teardown.
  • getTargetDevice() (test/functional/helpers/simulator.ts): in CI, requires SIMULATOR_UDID (fails loudly if unset — CI must never boot its own simulator here); locally, boots the existing device matching DEVICE_NAME if needed, and lists available simulators if none match. Never creates a new device.
  • PLATFORM_NAME/PLATFORM_VERSION/DEVICE_NAME (test/functional/desired.ts) are now mandatory env vars, no guessed defaults.
  • Two scenarios per platform: build-and-start-from-sources, and start-from-a-prebuilt-binary (usePrebuiltWDA), both driven by real positive-path checks — GET /status, session-less GET /source, and session-scoped GET /session/:id/source via a real WDA-issued session (the sessionId passed to launch() is Appium-side only and never reaches WDA).
  • afterEach always calls agent.quit(), so a failed assertion can't leave a leftover WDA process/port for the next test.

CI

  • functional-test.yml: adopts futureware-tech/simulator-action@v5 (matching appium-xcuitest-driver's current setup, including the Xcode 27 → DeviceHub.app fix) instead of hand-rolled xcrun simctl scripting, plus two new watchOS matrix rows (Min/Max Xcode, matching wda-tests.yml's existing pairing).
  • Scripts/ci/wait-for-simulator-idle.mjs (new): polls the simulator's process-tree CPU usage and waits for it to settle before tests run, ported from appium-xcuitest-driver's stability fix — takes the simulator UDID directly from simulator-action's output.
  • publish.js.yml / wda-package.yml: watchOS simulator (arm64 + x86_64) build entries, mirroring the existing tvOS entries. No real-device entry.

Tooling

  • npm run bundle:watch added alongside bundle:ios/bundle:tv.

Notes

  • publish.js.yml's release job only runs if build-wda succeeds for every matrix entry, so a broken watchOS build would now also block iOS/tvOS releases — the same coupling that already exists for tvOS today, just extended to a third platform.

…ease pipeline

Wires watchOS through the Node/TypeScript layer (scheme/SDK selection, xctestrun
naming, a clear error for unsupported real-device watchOS requests), rewrites the
functional test suite to assume an already-booted/settled simulator and cover both
the source-build and prebuilt-binary WDA startup paths, adds watchOS entries to the
simulator-binary prebuild workflows, and adopts futureware-tech/simulator-action for
simulator boot with a ported CPU-settle stability check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

4 participants