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

mutcli-0.1.1.tar.gz (131.6 kB view details)

Uploaded Source

Built Distribution

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

mutcli-0.1.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file mutcli-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for mutcli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5fc3d104cfedeb4666b09a273d6d6a26b5ded6cabe39c39f78508f527d8c6720
MD5 84f760ce82c5eb68edd1e1fcb4411a0d
BLAKE2b-256 0ecf2544eb7962fa8cbc7b6c35a9198175f805c6c519066ba1dfe89a64be6948

See more details on using hashes here.

File details

Details for the file mutcli-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for mutcli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3a322cbb384b8912d7b042200ef1886e867f78816681a8b0840017e09e45ee1
MD5 690a13f7218920ebd53f7afe64c46321
BLAKE2b-256 c24613bde8b8b377819d5739e1e1429cc621b82128c6773be97dede492e28372

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