Check an app screen on an Android emulator
The fastest mobile check is one objective against a fresh install of your build. In this recording, Kane CLI installs an APK on an Android emulator, confirms the home screen is displayed after launch, reads the main heading, and stores it ashome_title, passing in two steps.
-
List the emulators Kane CLI can use with
kane-cli devices list --target emulator. -
Run the objective against your build, naming the device and OS version exactly as the list prints them:
- Watch the emulator as Kane CLI launches the app, generates checkpoints from the objective, and works through them.
- Read the summary, which quotes the heading it stored, and open the run in Test Manager to replay each step.
-
Save the device as a default with
kane-cli config set-device-nameandkane-cli config set-os-version, so later runs need only--targetand--app.
Run the same check on an iOS simulator
An objective that describes what the user sees, rather than how the screen is built, runs on both platforms unchanged. This use case points the same check at an iOS simulator build.- List the simulators with
kane-cli devices list --target simulator. - Run the same objective with the simulator target and a
.zipbuild, for examplekane-cli run "Verify the app home screen is displayed after launch, then store the main heading text as 'home_title'" --target simulator --app ./builds/MyApp.zip. - Compare the stored
home_titlefrom both runs to confirm the two apps show the same heading.
--app. The emulator target takes an .apk, the simulator target takes a .zip, and both accept an uploaded APP ID from kane-cli apps list --target emulator|simulator.
Commit a mobile flow as a test
A mobile check becomes a regression test once the target, app, and device live in the file. This use case writes a_test.md that replays on every build of the app.
-
Add the mobile keys to the frontmatter:
cart-app_test.md
-
Run it with
kane-cli testmd run tests/cart-app_test.md --agent. The first run authors each step, and later runs replay them. -
Run every mobile test in the folder with
kane-cli testrun run --match '^tests/app/' --device-name "Pixel 7 API 35" --os-version 15.
no_reset.
Reuse a web recipe in the app
The E-commerce and Payments recipes describe what the shopper sees, so most of them work in your app with a frontmatter change. This use case reuses one recipe on both platforms.- Copy a web recipe, for example
add-to-cart-with-variant_test.md, toadd-to-cart-with-variant-app_test.md. - Replace
urlwithtarget,app,device_name, andos_version. - Change any web-only wording, such as “click” to “tap” and “page” to “screen”, and keep every check the same.
- Tag both files with the same feature tag, for example
tags: [variant], and run them as separate web and mobile runs.
Run the mobile suite on the cloud grid
A team member on Linux or Windows, or a CI runner, cannot boot an iOS simulator locally.kane-cli testrun run --remote sends the mobile tests to the cloud grid, which boots the device, installs the app, runs the suite, and returns the recordings and the evidence pack.
- Install the plugin once with
kane-cli plugin install remote-execution. - List what the grid can provide with
kane-cli devices list --target emulator --remote. - Check the plan without running anything:
kane-cli testrun run --match '^tests/app/' --remote --device-name "Pixel 7" --os-version 14 --dry-run. - Run it by removing
--dry-run. A local build is uploaded from your machine before the job starts. - Keep one platform per job, because emulator members run on one Android version and simulator members run on one HyperExecute pool.
Next steps
- Mobile Testing: set up the Android emulator and the iOS simulator
- Android Emulator and iOS Simulator: platform guides
- CI/CD & DevOps Testing: run the mobile suite in your pipeline
- Evidence: screenshots and logs for every mobile step