skillfed

mobly

Automation framework for special end-to-end test cases

mobly v1.13.1 252.8K downloads/30d#8,532 on PyPI751
Permissive license Apache2.0 Active released

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 mobly

uv

uv add mobly

poetry

poetry add mobly

Installing 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

multi-device test frameworkandroid device testing automationhardware integration testingend-to-end device orchestrationiot device testing frameworkcomplex environment test harnessdevice controller framework
multi-device-testingandroid-automationhardware-integration

More Testing packages