For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

Mobile Testing with Kane CLI

Kane CLI can run tests against mobile virtual devices: Apple's iOS Simulator and Google's Android Emulator. You author and run mobile tests the same way you already do for the browser. The differences are that a mobile test runs against an app you provide, and that the target device is a simulator or emulator instead of a browser.

There are two places that device can live:

Where the device runsWhat the machine needsHow to run
LocalA simulator or emulator on your machinemacOS on Apple Silicon (arm64) with Xcode, Android Studio, or bothkane-cli run … --target emulator|simulator, kane-cli testmd run, kane-cli testrun run
Cloud gridA virtual device on a HyperExecute macOS hostAny machine: Linux, Windows, or an Intel or Apple Silicon Mac, with no mobile tooling. Your TestMu AI plan must include HyperExecute with macOS runnerskane-cli testrun run … --remote, see Remote Runs
note

Local mobile runs require macOS on Apple Silicon (arm64). Intel Macs, Linux, and Windows cannot boot the simulator or emulator locally. On those machines, run mobile suites on the cloud grid with --remote. The setup steps below cover the local path.

What Mobile Means Here​

Native app testing. A mobile test drives an installed app. You pass a build, or an app id from a previous upload, with --app. Kane CLI installs it on the device and runs your objective against it. WebViews inside the app under test are handled.

warning

Pointing a mobile run at a website is not supported yet. Mobile runs target a native app, not a mobile web page.

Two targets. emulator is a virtual Android device and simulator is a virtual iOS device. The default target stays desktop, the browser, so nothing changes for your existing web runs.

Why a Single Architecture for Local Runs​

Apple Silicon runs both mobile stacks natively. The iOS Simulator is a first-class Apple target, and Android ships arm64-v8a emulator images that run on the Mac's built-in hypervisor with hardware acceleration.

Standardising on one host architecture keeps local setup predictable and runs fast, with no cross-architecture translation in the path. Other machines reach the same devices through the cloud grid, where the grid's macOS runners do the booting.

How Setup Works​

There are two halves, and Kane CLI owns the second.

1. You provide the virtual device. Apple's and Google's own tooling, Xcode or Android Studio, supplies the simulator or emulator. These are the same tools Apple and Google already ship for building simulators and emulators. Kane CLI does not ship an iOS runtime, an Android SDK, an emulator, or a system image.

2. Kane CLI installs its own test tooling and drives the device. After a one-time kane-cli doctor --target emulator|simulator --install, covered in Setup below, Kane CLI discovers the device, boots it, installs your app, and runs the test. You do not boot the simulator or emulator by hand.

Run kane-cli doctor --target emulator|simulator at any time to check what is ready and what is missing. It prints one line per required check, each with a fix. kane-cli devices list --target emulator|simulator lists the devices Kane CLI can run against.

Prerequisites​

TargetVirtual deviceYou provideApp formats
iOSiOS SimulatorXcode, the full app, version 16 or newer. The standalone Command Line Tools are not enough.zip build, or an uploaded app id
AndroidAndroid EmulatorAndroid Studio or the command line Android SDK tools, plus one arm64-v8a AVD.apk build, or an uploaded app id

An uploaded app id is APP followed by six or more digits.

Both targets require macOS on Apple Silicon and a one-time kane-cli doctor --target emulator|simulator --install. Set up only the platform you intend to test, or both if you test on both. None of this is needed for --remote runs.

Setup​

tip

Prefer not to set up a device on your machine? kane-cli testrun run … --remote runs the same mobile tests on a virtual device on a HyperExecute macOS host, from any machine and with none of the steps below. See Remote Runs.

Step 1: Prepare the Virtual Device​

Follow the tab for the platform you intend to test. Set up both if you test on both.

note

The exact iOS runtime versions and simulator device models in the supported matrix are pinned by the product team. The versions shown below are current, working examples. Confirm the officially supported set before you rely on a specific one.

Point the Command Line Tools at Xcode​

Kane CLI requires Xcode 16 or newer, which bundles the iOS Simulator, the simctl tool, and at least one iOS runtime. Kane CLI talks to the simulator through simctl, so make sure the developer directory resolves to the full Xcode install, not the standalone Command Line Tools:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license accept # accept the license non-interactively

Confirm Xcode and simctl are reachable:

xcodebuild -version                # should report 16.x or newer
xcrun simctl list devices available

You should see one or more iOS devices grouped under an iOS runtime. Xcode ships with default simulators. If none are listed, add one from Xcode → Settings → Platforms, or Xcode → Window → Devices and Simulators.

Step 2: Install the Kane CLI Test Tooling​

Sign in and let Kane CLI install the tooling it manages for the target you set up:

kane-cli login
kane-cli doctor --target simulator --install # or --target emulator

You do not need to boot a simulator, boot an emulator, or run adb yourself. Kane CLI discovers the device, boots it, installs your app, and runs the test.

Step 3: Ready Check​

Confirm Kane CLI sees a ready toolchain and, optionally, the devices on your machine:

kane-cli doctor --target simulator          # or --target emulator
kane-cli devices list --target simulator # the devices Kane CLI can run against

When the checks for your platform pass, setup is complete. On Android, confirm your AVD is listed by kane-cli devices list --target emulator. Address a device on a run with --device-name "<name>" --os-version <v>, as the list prints them.

Running a Mobile Test​

Once a target is set up, point a run at it:

# one-off, from the command line
kane-cli run "Sign in and open the account tab" --target simulator --app ./builds/MyApp.zip

# or set a default target once, then just run
kane-cli config set-target emulator
kane-cli run "Add the first item to the cart" --app ./builds/app-debug.apk

# a saved test, or a whole folder of them
kane-cli testmd run tests/checkout_test.md
kane-cli testrun run tests/app/ --device-name "Pixel 7 API 35" --os-version 15

--app is required for every mobile run. The simulator target accepts a .zip build, the emulator target accepts an .apk build, and both accept an uploaded app id, APP followed by six or more digits. kane-cli apps list --target emulator|simulator lists the uploaded builds your account can use.

You also need a device. Pick it with --device-name and --os-version, as kane-cli devices list --target emulator|simulator prints them: a name needs a version, and a version on its own matches any device running it. In the TUI or an interactive terminal, leaving the device flags off opens a one-time picker and saves your choice. A non-interactive run, such as one in CI, needs a device already set with the flags or with kane-cli config set-device-name and kane-cli config set-os-version, or the run exits and prints the fix. On the desktop target, the device flags and --app are ignored.

In the interactive TUI, switch targets with /mobile and /desktop, and run /doctor to check mobile tooling and devices.

For the full flag list and the app formats each target accepts, see the CLI Reference. To save a default target, device, and app instead of passing flags every time, see Configuration. To run a mobile test from a file, see Test.md, and to run a folder of them, see Batch Runs.

Running a Mobile Suite on the Cloud Grid​

kane-cli testrun run --remote sends your mobile _test.md files to TestMu AI HyperExecute, which boots a virtual device on a macOS host, installs the app, runs the suite, and returns the recordings and evidence pack to your project. Anyone on the team can author and run mobile tests this way, from any operating system, with none of the local setup above.

Verified
kane-cli plugin install remote-execution                              # once
kane-cli devices list --target emulator --remote # what the grid can provision
kane-cli testrun run tests/app/ --remote --device-name "Pixel 7" --os-version 14 --dry-run
kane-cli testrun run tests/app/ --remote --device-name "Pixel 7" --os-version 14

Three things differ from a run on your own machine:

  • The device comes from the grid catalog. List it with kane-cli devices list --target emulator|simulator --remote, not from the AVDs or simulators on your machine.
  • One job runs one platform. Emulator members run on one Android version, and simulator members run on one HyperExecute pool.
  • A local build is uploaded from your machine before dispatch and handed to the grid as an APP… id.

The prerequisites, the app rules, and what one job can hold are in Remote Runs.

Evidence for a Mobile Run​

The result summary records the device in the run environment, for example the device model and OS version, and the per-step logs include device logs from the emulator or simulator alongside the usual browser logs.

Common Failures​

PlatformSymptomCauseFix
iOSdoctor reports Xcode is too oldXcode older than 16Update Xcode to 16 or newer from the App Store
iOSxcrun: error: unable to find utility "simctl"Developer directory points at the standalone Command Line Tools, not XcodeRun sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
iOSdoctor reports no developer directoryFull Xcode not installed, or never launchedInstall Xcode from the App Store, launch it once, then run xcode-select --install
iOS"No iOS simulator found" when picking a deviceNo simulator device exists yetAdd one in Xcode → Window → Devices and Simulators, then reopen the list
AndroidEmulator boots extremely slowly or hangsAn x86 or x86_64 image on Apple SiliconRecreate the AVD from an arm64-v8a system image
Androiddoctor cannot find the emulator, or "No Android emulator found" when picking a deviceSDK in a non-default location, or no AVD created yetSet ANDROID_HOME, and create an AVD in Android Studio → Device Manager
AndroidPrompts to install Intel HAXMFollowing an Intel Mac guideNot needed on Apple Silicon. It uses the built-in Hypervisor framework, so skip HAXM

Next Steps​

Terminal First Testing With Kane CLI

Natural language browser & mobile app tests right from terminal.

×
Schedule Your Personal Demo
Kane CLI terminal

Help and Support

Related Articles