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
adbin PATHscrcpy3.x installedGOOGLE_API_KEYenvironment 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
Release history Release notifications | RSS feed
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.2.3.tar.gz
(230.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mutcli-0.2.3-py3-none-any.whl
(51.2 kB
view details)
File details
Details for the file mutcli-0.2.3.tar.gz.
File metadata
- Download URL: mutcli-0.2.3.tar.gz
- Upload date:
- Size: 230.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42d423f4ea38e9a27a4bd5afd3bbdacb3af58f25bdd869aec4c22056b56c6722
|
|
| MD5 |
11b6be10669d40a5400ff78f30820e41
|
|
| BLAKE2b-256 |
a1ddb688c0cbb0142b28b08a1097ffd60e89470432437dd1ea91bcc4f62bce00
|
File details
Details for the file mutcli-0.2.3-py3-none-any.whl.
File metadata
- Download URL: mutcli-0.2.3-py3-none-any.whl
- Upload date:
- Size: 51.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f92c6fd91e6a7006716b94dd6771a943a93f851e89fac928a067ceae7184085d
|
|
| MD5 |
282fe4d82d2b678cff9e2b713cd417e1
|
|
| BLAKE2b-256 |
45ddb5d2487115d7933851a08bd91495cd029be8453a094f50c4d3382cae1702
|