webdriverio / webdriverio/desktop-mobile
test(mobile): add standalone E2E coverage + document the standalone Appium contract (RN + Flutter)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 6
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 33
Description
Summary
The standalone session helpers for the mobile services already ship and are unit-tested, but — unlike every desktop service — they have zero E2E coverage, and the standalone contract (which differs from the testrunner path in two material ways) is undocumented.
This is the mobile half of the standalone/multiremote coverage audit. (Multiremote is tracked separately.)
What already exists
packages/native-mobile-core/src/session.ts—createMobileSession()factory: driveslauncher.onPrepare()→remote()→ manually callsworker.before()→ tracks launcher/worker forcleanup(). Same shape as the desktopinit()inelectron/tauri/dioxussrc/session.ts.packages/react-native-service/src/session.ts+packages/flutter-service/src/session.tsbind it to their launcher/worker and exportstartWdioSession/cleanupWdioSession/createReactNativeCapabilities|createFlutterCapabilities(react-native-service/src/index.ts,flutter-service/src/index.ts) — identical public surface to Tauri/Dioxus.- Unit-tested:
native-mobile-core/test/session.spec.ts,react-native-service/test/index.spec.ts,flutter-service/test/index.spec.ts. - The worker
before()is self-sufficient given a live Appium session — RN'sMetroBridgediscovers/connects to Hermes itself; it does not depend on launcher-stamped state. So standalone works functionally.
The gaps
1. No E2E coverage. No e2e/test/react-native/standalone/ or e2e/test/flutter/standalone/ specs, no test:e2e:*:standalone script, no CI leg — the mobile reusable workflows (_ci-e2e-react-native.reusable.yml, _ci-e2e-flutter.reusable.yml) run standard only. Desktop runs standalone in its CI matrix. The shipped startWdioSession export is never exercised against a real device.
2. Two undocumented divergences from the testrunner path:
- Appium isn't auto-spawned. The runner path composes
@wdio/appium-service(e2e/wdio.react-native.conf.tsservices:); standaloneinit()does not — it assumes an externally-running Appium and defaults tolocalhost:4723/(overridable via theconnectionarg). A caller expectingremote()-style self-contained startup gets a connection failure. - No device claiming /
appium:udidstamping. Standalone drives onlylauncher.onPrepare(), neveronWorkerStart()— andonWorkerStartis whereDeviceManager.claim()+applyToCapability()stamp the udid (native-mobile-core/src/launcher.ts). Standalone therefore relies on Appium's default single-device selection (or a caller-supplied udid). Fine for one device; a real divergence from the pooled runner behaviour, and nowhere documented.
Proposed work
- E2E specs for RN + Flutter mirroring
e2e/test/tauri/standalone/api.spec.ts(session create → a representativeexecute/mockassertion →cleanupWdioSession). Cost is low — single device (same asstandard), and CI already runs Appium. Cheapest wiring: append to the existingstandardjob to reuse the already-booted emulator + running Appium, rather than a second matrix leg that re-boots an emulator. - Docs: the standalone Appium-server contract (external Appium,
localhost:4723default,connectionoverride) and the single-device/udid caveat (no pool claiming in standalone).
Out of scope
- Multiremote E2E (separate issue).
- Spawning Appium from the standalone helper — current "bring your own Appium" contract is fine; this issue only asks that it be documented.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with e2e/test/tauri/standalone/api.spec.ts and the mobile session exports, then inspect _ci-e2e-react-native.reusable.yml and _ci-e2e-flutter.reusable.yml. Add RN and Flutter standalone specs covering session creation, a representative execute/mock assertion, and cleanup, and document the external Appium and single-device contract. Done means both specs run in the existing standard CI jobs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flutter, github-actions, react-native, typescript
- Domain
- ci-cd, documentation, mobile, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100