mobly
Automation framework for special end-to-end test cases
What it is and what it does
Mobly is a Python test framework built to handle test scenarios that require coordinating multiple devices or complex hardware environments. It originated from Google's internal testing needs and provides a structured way to write, configure, and execute tests that involve interactions between phones, wearables, IoT devices, or specialized RF equipment. The framework abstracts device control through pluggable controllers, with built-in support for Android devices via adb.
The framework handles the operational complexity of multi-device testing: device discovery and initialization, test isolation, logging across devices, and teardown. It depends on portpicker for port allocation, pyyaml for configuration parsing, and pywin32 for Windows compatibility. Tests are written as classes inheriting from base_test.BaseTestClass, with lifecycle hooks for setup and teardown at test and class levels.
Use it for:
- Test peer-to-peer data transfer protocols between two Android devices or other connected hardware.
- Verify conference call functionality across multiple phones with coordinated audio/video validation.
- Test wearable device integration with a companion phone, including pairing and data synchronization.
- Validate IoT device communication and interoperability in multi-device mesh or hub-and-spoke topologies.
- Measure RF characteristics of devices using specialized test equipment controlled alongside device under test.
- Test LTE network behavior by orchestrating phones, base station simulators, and evolved Node B emulators.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Mobly is a Python test framework designed to orchestrate test cases involving multiple devices, complex environments, or custom hardware setups, with built-in support for Android device control.
Yes. Mobly is actively maintained, has low install friction, carries a permissive license, and solves a specific and genuine problem—orchestrating tests across multiple devices or complex hardware environments. It is well-suited for teams testing Android devices, IoT systems, or RF equipment. The Python 3.11+ requirement and adb dependency are reasonable constraints for its target use case. No known vulnerabilities.
Install
mobly on PyPI
pip
pip install moblyuv
uv add moblypoetry
poetry add moblyInstalling mobly
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release (7 days old) and steady commit activity. Requires Python 3.11 or newer and system adb (1.0.40+ recommended), plus three lightweight runtime dependencies.
License in practice
Licensed under Apache 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install mobly
from mobly import base_test
from mobly import config_parser
from mobly import runtime_test_info
class MyTest(base_test.BaseTestClass):
def setup_test(self):
pass
def test_example(self):
pass
Requires Python 3.11 or newer. System adb (1.0.40+) is required for Android device control. pywin32 dependency may require compilation on Windows.
Verify before relying
- Whether adb must be pre-installed on the system or if Mobly can manage it automatically.
- Specific version constraints for portpicker and pyyaml beyond what pip resolves.
- Whether the framework supports device types beyond Android or if custom device controllers are the primary extension mechanism.
Package facts
| License | Apache2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — portpicker, pywin32, pyyaml |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 252,780/month — #8,532 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mobly-1.13.1-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
tflite-runtimeTensorFlow Lite runtime enables on-device…
permissive · top 15,000 on PyPI
ai-edge-litertai-edge-litert runs machine learning models on…
permissive · top 15,000 on PyPI
executorchExecuTorch exports and runs PyTorch models on…
permissive · top 15,000 on PyPI
mozdeviceManages and controls connected mobile devices…
copyleft · top 15,000 on PyPI
uiautomatorPython wrapper for Android's uiautomator…
permissive · top 15,000 on PyPI
KivyKivy is a Python framework for building…
permissive · top 15,000 on PyPI
adbutilsadbutils is a Python library that communicates…
permissive · top 15,000 on PyPI
bumbleBumble is a full-featured Bluetooth stack…
permissive · top 15,000 on PyPI
pylibftdiPythonic interface to FTDI USB devices via…
permissive · top 15,000 on PyPI
ai-edge-litert-nightlyLiteRT is a runtime for running trained machine…
permissive · top 15,000 on PyPI