CLI tool to run Espresso, XCUITest and Maestro tests on TestingBot's cloud infrastructure
npm install @testingbot/cli
Run mobile tests on real devices in the cloud
Website
·
Documentation
·
npm
---

---
Run Espresso, XCUITest and Maestro tests on real devices in the cloud.
- Real Devices — Test on thousands of real iOS and Android devices
- Emulators & Simulators — Fast feedback with virtual devices
- Parallel Execution — Split tests across multiple devices with sharding
- CI/CD Ready — Integrates with GitHub Actions, Jenkins, and more
- Live Results — Watch tests run in real-time
- Artifacts — Download videos, screenshots, and logs
---
``sh`
npm install -g @testingbot/cli
Requirements: NodeJS 20 or higher
The CLI requires TestingBot API credentials. You can authenticate in several ways:
`sh`
testingbot login
This opens your browser for authentication. After logging in, your credentials are saved to ~/.testingbot.
- Command-line options: --api-key and --api-secretTB_KEY
- Environment variables: and TB_SECRET~/.testingbot
- Config file: Create with content key:secret
Run Maestro UI tests on real devices and emulators/simulators.
`sh`
testingbot maestro
Arguments:
- app - Path to your app file (.apk, .ipa, .app, or .zip)flows
- - One or more paths to flow files (.yaml/.yml), directories, .zip files, or glob patterns
Device Options:
| Option | Description |
|--------|-------------|
| --device | Device name (e.g., "Pixel 9", "iPhone 16") |--platform
| | Platform: Android or iOS |--deviceVersion
| | OS version (e.g., "14", "17.2") |--real-device
| | Use a real device instead of emulator/simulator |--orientation
| | Screen orientation: PORTRAIT or LANDSCAPE |--device-locale
| | Device locale (e.g., "en_US", "de_DE") |--timezone
| | Timezone (e.g., "America/New_York", "Europe/London") |
Test Configuration:
| Option | Description |
|--------|-------------|
| --name | Test name for dashboard identification |--build
| | Build identifier for grouping test runs |--include-tags
| | Only run flows with these tags (comma-separated) |--exclude-tags
| | Exclude flows with these tags (comma-separated) |-e, --env
| | Environment variable for flows (can be repeated) |--maestro-version
| | Maestro version to use (e.g., "2.0.10") |
Network & Location:
| Option | Description |
|--------|-------------|
| --throttle-network | Network throttling: 4G, 3G, Edge, airplane, or disable |--geo-country-code
| | Geographic IP location (ISO country code, e.g., "US", "DE") |
Output Options:
| Option | Description |
|--------|-------------|
| --async | Start tests and exit without waiting for results |-q, --quiet
| | Suppress progress output |--report
| | Download report after completion: html or junit |--report-output-dir
| | Directory to save reports (required with --report) |--download-artifacts [mode]
| | Download test artifacts (logs, screenshots, video). Mode: all (default) or failed |--artifacts-output-dir
| | Directory to save artifacts zip (defaults to current directory) |
Advanced Options:
| Option | Description |
|--------|-------------|
| --shard-split | Split flows into N parallel sessions for faster execution |--ignore-checksum-check
| | Skip checksum verification and always upload the app |
CI/CD Integration:
| Option | Description |
|--------|-------------|
| --commit-sha | Git commit SHA associated with this test run |--pull-request-id
| | Pull request ID this test run originated from |--repo-name
| | Repository name (e.g., GitHub repo slug) |--repo-owner
| | Repository owner (e.g., GitHub organization or username) |
Examples:
`shBasic usage
testingbot maestro app.apk ./flows
---
$3
Run Android Espresso tests on real devices and emulators.
`sh
testingbot espresso [appFile] [testAppFile] [options]
`Arguments:
-
appFile - Path to application APK file
- testAppFile - Path to test APK file containing Espresso testsDevice Options:
| Option | Description |
|--------|-------------|
|
--app | Path to application APK file |
| --test-app | Path to test APK file |
| --device | Device name (e.g., "Pixel 6", "Samsung.*") |
| --platform-version | Android OS version (e.g., "12", "13", "14") |
| --real-device | Use a real device instead of an emulator |
| --tablet-only | Only allocate tablet devices |
| --phone-only | Only allocate phone devices |
| --locale | Device locale (e.g., "en_US", "de_DE") |
| --timezone | Timezone (e.g., "America/New_York", "Europe/London") |Test Configuration:
| Option | Description |
|--------|-------------|
|
--name | Test name for dashboard identification |
| --build | Build identifier for grouping test runs |
| --test-runner | Custom test instrumentation runner |
| --language | App language (ISO 639-1 code, e.g., "en", "fr", "de") |Test Filtering:
| Option | Description |
|--------|-------------|
|
--class | Run tests in specific classes (comma-separated fully qualified names) |
| --not-class | Exclude tests in specific classes |
| --package | Run tests in specific packages (comma-separated) |
| --not-package | Exclude tests in specific packages |
| --annotation | Run tests with specific annotations (comma-separated) |
| --not-annotation | Exclude tests with specific annotations |
| --size | Run tests by size: small, medium, large (comma-separated) |Network & Location:
| Option | Description |
|--------|-------------|
|
--throttle-network | Network throttling: 4G, 3G, Edge, or airplane |
| --geo-location | Geographic IP location (ISO country code, e.g., "US", "DE") |Output Options:
| Option | Description |
|--------|-------------|
|
--async | Start tests and exit without waiting for results |
| -q, --quiet | Suppress progress output |
| --report | Download report after completion: html or junit |
| --report-output-dir | Directory to save reports (required with --report) |Examples:
`sh
Basic usage with positional arguments
testingbot espresso app.apk app-test.apk --device "Pixel 8"Using named options
testingbot espresso --app app.apk --test-app app-test.apk --device "Pixel 8"Real device with specific Android version
testingbot espresso app.apk app-test.apk \
--device "Samsung Galaxy S24" \
--platform-version "14" \
--real-deviceRun specific test classes
testingbot espresso app.apk app-test.apk \
--device "Pixel 8" \
--class "com.example.LoginTest,com.example.HomeTest"Run tests with annotations
testingbot espresso app.apk app-test.apk \
--device "Pixel 8" \
--annotation "com.example.SmokeTest" \
--size "small,medium"With network throttling and geolocation
testingbot espresso app.apk app-test.apk \
--device "Pixel 8" \
--throttle-network "3G" \
--geo-location "DE" \
--language "de"Download JUnit report
testingbot espresso app.apk app-test.apk \
--device "Pixel 8" \
--report junit \
--report-output-dir ./reports
`---
$3
Run iOS XCUITest tests on real devices and simulators.
`sh
testingbot xcuitest [appFile] [testAppFile] [options]
`Arguments:
-
appFile - Path to application IPA file
- testAppFile - Path to test ZIP file containing XCUITestsDevice Options:
| Option | Description |
|--------|-------------|
|
--app | Path to application IPA file |
| --test-app | Path to test ZIP file |
| --device | Device name (e.g., "iPhone 15", "iPad.*") |
| --platform-version | iOS version (e.g., "17.0", "18.2") |
| --real-device | Use a real device instead of a simulator |
| --tablet-only | Only allocate tablet devices |
| --phone-only | Only allocate phone devices |
| --orientation | Screen orientation: PORTRAIT or LANDSCAPE |
| --locale | Device locale (e.g., "DE", "US") |
| --timezone | Timezone (e.g., "America/New_York", "Europe/London") |Test Configuration:
| Option | Description |
|--------|-------------|
|
--name | Test name for dashboard identification |
| --build | Build identifier for grouping test runs |
| --language | App language (ISO 639-1 code, e.g., "en", "fr", "de") |Network & Location:
| Option | Description |
|--------|-------------|
|
--throttle-network | Network throttling: 4G, 3G, Edge, or airplane |
| --geo-location | Geographic IP location (ISO country code, e.g., "US", "DE") |Output Options:
| Option | Description |
|--------|-------------|
|
--async | Start tests and exit without waiting for results |
| -q, --quiet | Suppress progress output |
| --report | Download report after completion: html or junit |
| --report-output-dir | Directory to save reports (required with --report) |Examples:
`sh
Basic usage with positional arguments
testingbot xcuitest app.ipa app-test.zip --device "iPhone 16"Using named options
testingbot xcuitest --app app.ipa --test-app app-test.zip --device "iPhone 16"Real device with specific iOS version
testingbot xcuitest app.ipa app-test.zip \
--device "iPhone 15 Pro" \
--platform-version "17.2" \
--real-deviceiPad in landscape mode
testingbot xcuitest app.ipa app-test.zip \
--device "iPad Pro" \
--tablet-only \
--orientation LANDSCAPEWith localization settings
testingbot xcuitest app.ipa app-test.zip \
--device "iPhone 16" \
--locale "DE" \
--language "de" \
--timezone "Europe/Berlin"With network throttling and geolocation
testingbot xcuitest app.ipa app-test.zip \
--device "iPhone 16" \
--throttle-network "3G" \
--geo-location "DE"Download HTML report
testingbot xcuitest app.ipa app-test.zip \
--device "iPhone 16" \
--report html \
--report-output-dir ./reportsRun in background
testingbot xcuitest app.ipa app-test.zip \
--device "iPhone 16" \
--async
`---
Common Features
$3
By default, the CLI shows real-time progress updates including:
- Test status updates with actual device names (even when using wildcards)
- Device allocation status
- Live output from Maestro flows
Use
--quiet to suppress progress output.$3
Press
Ctrl+C to gracefully stop running tests. The CLI will:
1. Stop all active test runs on TestingBot
2. Clean up resources
3. Exit with appropriate status codePress
Ctrl+C twice to force exit immediately.$3
All test frameworks support downloading reports after completion:
`sh
JUnit XML format (for CI integration)
--report junit --report-output-dir ./reportsHTML format (for human viewing)
--report html --report-output-dir ./reports
`$3
Download all test artifacts including logs, screenshots, and video recordings:
`sh
testingbot maestro app.apk ./flows --download-artifacts --build "my-build"
`Artifacts are saved as a zip file named after the
--build value (or with a timestamp if not provided).Exit Codes
-
0 - All tests passed
- 1` - One or more tests failed or an error occurredDocumentation
For more information, visit TestingBot Documentation.
License
MIT