Skip to main content

Mobile UI Testing CLI - Run YAML-based mobile tests anywhere

Project description

mut - Mobile UI Testing CLI

Run YAML-based mobile UI tests anywhere - CI/CD, local development, or scripts.

Features

  • Run anywhere - No Claude Code dependency, works in CI/CD
  • Fast screenshots - ~50ms via scrcpy frame buffer
  • AI verification - Gemini 2.5 Flash for visual assertions
  • Video recording - Capture test execution for debugging
  • Record tests - Capture user interactions to generate YAML

Installation

pip install mut

Requirements

  • Python 3.11+
  • Android device/emulator with USB debugging enabled
  • adb in PATH
  • scrcpy 3.x installed
  • GOOGLE_API_KEY environment variable (for AI features)

Quick Start

Run a test

mut run tests/login.yaml

Record a test

mut record login-flow
# Interact with your app...
mut stop

List devices

mut devices

YAML Test Format

config:
  app: com.example.app

setup:
  - terminate_app
  - launch_app
  - wait: 2s

tests:
  - name: Login flow
    steps:
      - tap: "Email"
      - type: "user@test.com"
      - tap: "Password"
      - type: "secret123"
      - tap: "Sign In"
      - verify_screen: "Welcome screen with user greeting"

Commands

mut run <test.yaml>

Execute a YAML test file.

# Basic execution
mut run tests/login.yaml

# Skip AI verifications (faster, for CI)
mut run tests/login.yaml --no-ai

# Specify device
mut run tests/login.yaml --device emulator-5554

# Custom output
mut run tests/login.yaml --output reports/

mut record <name>

Start recording user interactions.

mut record checkout-flow

mut stop

Stop recording and generate YAML test.

mut stop
# Opens browser with approval UI
# Export YAML when done

mut devices

List connected devices.

mut devices

Configuration

Global config (~/.mut.yaml)

ai:
  model: gemini-2.5-flash

defaults:
  video: true
  verbose: false

Project config (.mut.yaml)

device: emulator-5554
test_dir: tests/
report_dir: reports/

CI/CD Integration

GitHub Actions

name: Mobile UI Tests
on: [push]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Install mut
        run: pip install mut

      - name: Run tests
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: 34
          script: mut run tests/login.yaml --no-ai

Environment Variables

Variable Description
GOOGLE_API_KEY Gemini API key for AI features
MUT_DEVICE Default device ID
MUT_VERBOSE Enable verbose logging

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mobileuitest-0.1.0.tar.gz (128.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mobileuitest-0.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file mobileuitest-0.1.0.tar.gz.

File metadata

  • Download URL: mobileuitest-0.1.0.tar.gz
  • Upload date:
  • Size: 128.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mobileuitest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 635e4f4c28735e715cfff808455ce5fdb9a9207530dfb259bb495b7b2828d671
MD5 3055d515914ea685cd1035ed05a8ef4e
BLAKE2b-256 5df6dd6d6979d4cb13013d92e577ecceccb2491eb5b65da90e9e5a6037c3a7b1

See more details on using hashes here.

File details

Details for the file mobileuitest-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mobileuitest-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mobileuitest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 163ce571318efc79202e48634a9ad3b204a076ffb76b39e97bdba6fbe7ff8126
MD5 ba5c9f618b9c547cf3d9880b57b841e7
BLAKE2b-256 9e20b2699bf8a3840810266946f93b4a99967da7396cea537b41589e7e71a6e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page