Repository navigation
Description
Problem or use case
I want a repeatable native-mobile application edit/build/install/test loop in Orca, covering Android and iOS on appropriate execution hosts.
Orca already documents emulator/device discovery and control. Its inspected guides include Android installation, launch, permissions, and logcat operations; iOS Simulator execution requires a Mac with the appropriate tools. The request is to integrate these existing capabilities into an observable development and regression-testing workflow, with capability gaps stated per backend.
Proposed solution
Provide replayable mobile test sessions scoped to a worktree or folder workspace, with:
- A saved recipe for the app build/artifact, package/bundle identity, launch/readiness conditions, fixture/reset behavior, and scenario or existing project test command. Tie every result to the build actually installed or updated on the device.
- Explicit target selection: platform, physical device/emulator/simulator, OS version, device ID, and execution host. Show prerequisites and unavailable combinations before starting.
- Integration with the build/deploy/run workflow requested in [Feature]: Add "Run Build to Emulator/Simulator" Button #8506 and the project's existing lifecycle commands, preserving application identity and reporting the installed build. Use a capable Mac host for iOS platform tooling and Android's existing workflow where supported.
- Opt-in reruns after code saves, using framework-aware hot reload/Fast Refresh when the project supports it; otherwise perform the required rebuild/reinstall/relaunch and report whether application state was preserved or reset. Failed builds/updates retain the previous receipt under its previous build.
- Native accessibility-tree targeting, screenshots/video, and supported gesture/input controls, together with explicit native-versus-WebView context selection where available.
- Observable assertions and condition-based waits for replay. Resolve current accessibility targets rather than treating transient node numbers as persistent selectors.
- Repeatable fixture setup: application data/reset policy, permissions, deep links, orientation, keyboard, locale, connectivity, and location/camera/sensor inputs where the device backend supports them.
- Integration with existing project test runners for functional, accessibility, and visual checks; device/OS matrices with per-target pass/fail/skip/unsupported results.
- Build/device logs, crash reports, test traces, and performance measurements where supported, tied to the exact build and device/host.
- Task-scoped ownership and cleanup using the device/worktree isolation requested in feat: Allow more than one mobile emulator at a time (one per worktree) #12893. Serialize or report an explicit conflict where concurrent isolation is unavailable.
Acceptance criteria
- On a supported Android target, a fixture app can complete build, install, launch, test, edit/reload, and retest with build-bound artifacts.
- On a supported Mac/iOS target, the equivalent supported lifecycle is available; a Windows-only setup reports the missing Mac capability rather than implying native iOS coverage.
- A hot-reload-supported change and a native-code change exercise different, accurately reported update paths.
- A deliberate app crash, failed assertion, unavailable device, and unsupported fixture capability are reported distinctly.
- A saved scenario can be replayed with an intentional assertion failure; successful attach/install/launch alone cannot make the test pass.
- Tests exercise native UI and any supported WebView context explicitly; a responsive browser screenshot is not reported as a native-app test.
- Multiple selected device/OS targets have independent results, and rerunning a declared fixture has a documented data/permission reset policy.
- Reconnect preserves completed build/device evidence and identifies interrupted or unconfirmed steps without silently repeating them.
Alternatives or additional context
Existing Android/iOS command-line tools and mobile test runners can supply much of the execution. Orca could coordinate and surface their results rather than replacing them.
The Orca mobile companion is a controller/client; it should remain distinct from the application-under-test device. Browser extensions are relevant only to extension-capable browser/WebView targets, not something this proposal assumes native apps can load.
Related: #8506 already requests build/deploy/run UI, and #12893 requests worktree/device-stream isolation. This request adds saved scenarios, assertions, update-triggered reruns, and per-device evidence. #31280 concerns Orca's own mobile-web assets rather than applications under test. Existing guides: iOS and Android.
Activity