Mobile app testing
Shiplight tests native Android and iOS apps with the same YAML format it uses for web tests. A mobile test names its platform and app, and its steps tap, type, swipe, and assert on the app's own UI. Hybrid apps work too: a test can switch into a WebView page, act on its DOM, and switch back.
Shiplight drives the app through Appium: the UiAutomator2 driver on Android and the XCUITest driver on iOS. You run the Appium server and the devices; Shiplight opens the sessions, installs your app, and runs the steps.
Testing a website on a phone-sized screen?
That is browser emulation, not native app testing. See Check mobile layout.
What you can test
| Target | Supported |
|---|---|
| Android emulators | Yes |
| Android devices (USB) | Yes |
| iOS simulators | Yes |
| Remote Appium endpoint | Yes, Android and iOS: a device service or Appium grid that you or a vendor runs |
| WebViews | Android WebView and iOS WKWebView pages inside your app. See Hybrid apps |
iOS tests run on simulators. Shiplight does not provide devices: tests run on emulators, simulators, and devices that you connect, or on a remote Appium service that you choose.
What needs a Shiplight account
Explicit steps don't. A step with an
action:and alocator:runs through Appium on your machine and calls no AI model. A test made only of explicit steps andassert_*actions runs with no Shiplight account.AI steps do. An
intent:without anaction:,VERIFY:,WAIT_UNTIL:,ai_extract, AI conditions inIF:andWHILE:, and self-healing of a broken locator run on Shiplight's hosted service. They need a Shiplight API token. Run this once in your test project:bashbun run shiplight setup-api-tokenIt signs you in through the browser and writes
SHIPLIGHT_API_TOKENto the project's.env. In CI, setSHIPLIGHT_API_TOKENas a secret. See API Tokens.The visual debugger does.
shiplight debugon an Android or iOS test downloads the debugger and mobile components with your API token.Authoring with your coding agent doesn't. The MCP server opens native sessions and acts on element indices without any AI calls of its own. See Author with your agent.
Prerequisites
Install these on the machine that runs Appium:
Node.js 22 or newer and Bun, as for any Shiplight test project. See Run Locally.
Appium 2 and the driver for each platform you test:
bashnpm install --global appium appium driver install uiautomator2 # Android appium driver install xcuitest # iOSShiplight is tested with Appium 2.11, the UiAutomator2 driver 3.8, and the XCUITest driver 7.28.
For Android: the Android SDK with platform tools (
adb) and, for emulators, the emulator and a system image. SetANDROID_HOMEfor Appium. To test WebViews, Appium also needs a Chromedriver that matches the device's WebView version; see Hybrid apps.For iOS: a Mac with Xcode and an iOS simulator runtime. The first session on a simulator builds WebDriverAgent, which can take several minutes.
Start Appium before you run tests. By default it listens on http://127.0.0.1:4723:
appiumConfigure devices
Device profiles go in shiplight.config.json at the root of your test project, next to playwright.config.ts. Each profile names an Appium server and the devices behind it. A test picks a profile with app.device, or uses defaultDevice.
If the project has no devices, tests use a local Appium at http://127.0.0.1:4723 and whichever single device it finds. Add a profile when you need another Appium URL, a specific device, more than one device, or extra Appium capabilities.
Android emulator
{
"devices": {
"emulator": { "type": "local", "appiumUrl": "http://127.0.0.1:4723" }
}
}With no udids, the profile uses the one device Appium finds. platform defaults to android.
Android device
Connect the device over USB with USB debugging on, and find its serial with adb devices. List it in udids:
{
"devices": {
"pixel": {
"type": "local",
"platform": "android",
"appiumUrl": "http://127.0.0.1:4723",
"udids": ["R5CT1234567"]
}
}
}iOS simulator
Boot a simulator and find its UDID with xcrun simctl list devices booted:
{
"devices": {
"sim": {
"type": "local",
"platform": "ios",
"appiumUrl": "http://127.0.0.1:4723",
"udids": ["8F3C2A6E-1B4D-4C7A-9E2F-5D6B7A8C9E0F"],
"sessionOpenTimeoutSec": 300
}
},
"defaultDevice": "sim"
}sessionOpenTimeoutSec (default 120) is how long a test waits for its session to open. Raise it for iOS, where the first session builds WebDriverAgent.
Remote Appium endpoint
A remote profile sends sessions to an Appium URL that a device service or your own grid serves. You pass the capabilities that pick the device, and maxSessions limits how many sessions a run opens at once:
{
"devices": {
"cloud-android": {
"type": "remote",
"platform": "android",
"appiumUrl": { "$env": "DEVICE_SERVICE_URL" },
"capabilities": {
"appium:deviceName": "Pixel 8",
"appium:platformVersion": "14"
},
"maxSessions": 2,
"label": "Device service"
}
}
}On a remote profile, the app is one that you have already uploaded to the service. The test names it with app.appId instead of app.path; see The app block. label is shown in reports.
Several devices and profiles
- More than one device on one Appium server: list them all in
udids. Each device runs one session at a time, so set Playwright'sworkersto the number of devices. When all devices are busy, a test waits for one. - More than one profile: set
defaultDeviceto the profile that tests use when theirapp.deviceis not set. It is required when there is more than one profile. - Driver ports: with several devices, each device's session gets its own driver ports by default (Android
systemPort8200 and up; iOSwdaLocalPort8100 and up andmjpegServerPort9100 and up). To choose them, write the device as an object, such as{ "udid": "emulator-5556", "systemPort": 8210 }.
Profile reference
| Field | Profiles | Description |
|---|---|---|
type | All | local for an Appium server you run, remote for a device service |
platform | All | android (default) or ios. A profile serves one platform |
appiumUrl | All | The Appium server URL |
udids | Local | The devices to use, one session each: a UDID or adb serial, or an object with udid and driver ports. Default: the one device Appium finds |
capabilities | All | Appium capabilities, passed as they are. Required for remote |
maxSessions | Remote | How many sessions a run may open at once |
label | Remote | A name for the service, shown in reports |
sessionOpenTimeoutSec | All | How long a test waits for its session to open, in seconds. Default: 120 |
Any string value can be read from an environment variable with { "$env": "NAME" }, so URLs with credentials and device IDs stay out of the file. Shiplight sets the app, reset, and launch capabilities itself; if a profile sets one of them, Shiplight ignores it and prints a warning. iOS profiles reject capabilities that would change the browser or context Shiplight controls.
Next steps
- Write mobile tests: the app block, locators, actions, and AI steps.
- Hybrid apps: switch into a WebView and back.
- Author with your agent: let your coding agent explore the app and write the test.
- Run mobile tests: run locally and in CI.