Skip to content

testingbot/testingbotctl

Repository files navigation

Run Tests

TestingBot CLI

CLI tool to run Espresso, XCUITest and Maestro tests on TestingBot's cloud infrastructure.

Installation

npm install -g testingbotctl

Authentication

The CLI requires TestingBot API credentials. You can authenticate in several ways:

Browser Login (Recommended)

testingbot login

This opens your browser for authentication. After logging in, your credentials are saved to ~/.testingbot.

Other Methods

  • Command-line options: --api-key and --api-secret
  • Environment variables: TB_KEY and TB_SECRET
  • Config file: Create ~/.testingbot with content key:secret

Commands

Maestro

Run Maestro UI tests on real devices and emulators/simulators.

testingbot maestro <app> <flows> [options]

Arguments:

  • app - Path to your app file (.apk, .ipa, .app, or .zip)
  • flows - Path to flow file (.yaml/.yml), directory, .zip, or glob pattern

Options:

Option Description
--device <name> Device name (e.g., "Pixel 9", "iPhone 16")
--platform <name> Platform: Android or iOS
--deviceVersion <version> OS version (e.g., "14", "17.2")
--orientation <orientation> PORTRAIT or LANDSCAPE
--device-locale <locale> Device locale (e.g., "en_US", "de_DE")
--timezone <timezone> Timezone (e.g., "America/New_York")
--name <name> Test name for dashboard
--build <build> Build identifier for grouping
--throttle-network <speed> Network throttling: 4G, 3G, Edge, airplane, disable
--geo-country-code <code> Geographic IP location (ISO code)
--include-tags <tags> Only run flows with these tags (comma-separated)
--exclude-tags <tags> Exclude flows with these tags (comma-separated)
-e, --env <KEY=VALUE> Environment variable for flows (repeatable)
--maestro-version <version> Maestro version to use
--async Start tests and exit without waiting for results
-q, --quiet Suppress progress output
--report <format> Download report after completion: html or junit
--report-output-dir <path> Directory to save reports

Examples:

# Basic usage
testingbot maestro app.apk ./flows

# With device selection
testingbot maestro app.apk ./flows --device "Pixel 8" --deviceVersion "14"

# iOS app with tags
testingbot maestro app.ipa ./flows --platform iOS --include-tags "smoke,regression"

# With environment variables
testingbot maestro app.apk ./flows -e API_URL=https://staging.example.com -e API_KEY=secret

# Download JUnit report
testingbot maestro app.apk ./flows --report junit --report-output-dir ./reports

# Run in background (async)
testingbot maestro app.apk ./flows --async

Espresso

Run Android Espresso tests on real devices and emulators.

testingbot espresso [options]

Required Options:

Option Description
--app <path> Path to application under test (.apk)
--test-app <path> Path to test application (.apk)
--device <name> Real device to use
--emulator <name> Emulator to use

Example:

testingbot espresso \
  --app app.apk \
  --test-app app-test.apk \
  --device "Pixel 8" \
  --emulator "Android 14"

XCUITest

Run iOS XCUITest tests on real devices and simulators.

testingbot xcuitest [options]

Required Options:

Option Description
--app <path> Path to application under test (.ipa or .app)
--test-app <path> Path to test application
--device <name> Device to use

Example:

testingbot xcuitest \
  --app app.ipa \
  --test-app app-test.zip \
  --device "iPhone 16"

Exit Codes

  • 0 - All tests passed
  • 1 - One or more tests failed or an error occurred

Documentation

For more information, visit TestingBot Documentation.

License

MIT

About

A command line interface for the TestingBot platform. Run Maestro, XCUITest and Espresso.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published