Skip to content

Mobile Testing (iOS & Android)

How to test iOS (.ipa) and Android (.apk) mobile apps using plain English YAML tests.

ZeniTest allows you to run automated tests on iOS apps (.ipa) and Android apps (.apk) without writing native Appium or UIAutomator test code.


  • For Android Testing: Android Studio & SDK (adb in PATH), an active Android Emulator or connected physical device with USB Debugging enabled, and your built .apk.
  • For iOS Testing: macOS, Xcode & Xcode Command Line Tools (xcode-select --install), an active iOS Simulator or connected iPhone with Developer Mode, and your built .app or .ipa.

Place mobile test files in zenitests/ios/ or zenitests/android/:

zenitests/
├── ios/
│ ├── config.yaml # Default iOS settings (optional)
│ └── tc_ios_checkout.yaml
└── android/
├── config.yaml # Default Android settings (optional)
└── tc_android_checkout.yaml

You can set default device and app binary paths so you don’t have to type them every time:

bundlePath: build/Runner.app # .app for Simulator, .ipa for device
device: iPhone 15 Pro
parallel: 1

Mobile tests do not need a starting URL or navigate step because the app opens automatically when the test starts.

Example Android Test (zenitests/android/tc_checkout.yaml)

Section titled “Example Android Test (zenitests/android/tc_checkout.yaml)”
id: tc_android_checkout
title: Product Checkout Flow
expectedResult: Order confirmation message is displayed
steps:
- act: Tap the 'Add to Cart' button on 'ZeniPods Pro'
- validate: Cart badge shows '1'
- act: Tap the Cart icon
- validate: 'Your Cart' title and 'Proceed to Checkout' button are visible
- act: Tap 'Proceed to Checkout'
- validate: 'Order Placed Successfully!' is displayed

Run tests by pointing the CLI to your built .apk or .ipa app binary:

Terminal window
zenitest run --platform android --bundle ./build/app-debug.apk
Terminal window
zenitest run --platform ios --bundle ./build/Runner.ipa

Use the --device flag to choose which emulator, simulator, or physical device to run on:

Terminal window
# Android emulator
zenitest run --platform android --bundle ./build/app-debug.apk --device "Pixel 7"
# iOS simulator
zenitest run --platform ios --bundle ./build/Runner.app --device "iPhone 15 Pro"

Tip: If you set bundlePath and device in your config.yaml, you can simply run zenitest run --platform ios without any extra flags.


Use natural English phrases inside act steps:

  • Tapping: Tap 'Login', Tap the Shopping Cart icon
  • Typing: Type 'alex@example.com' into 'Email Address'
  • Scrolling: Scroll down to see the Checkout button
  • Checking: validate: Verify 'Welcome' text is visible