Mobly is an open-source test framework for host-driven, end-to-end automated testing. You can use Mobly to orchestrate actions across multiple devices to validate Android features including Wi-Fi and telephony.
Mobly basics
Using Mobly, you can write and execute Mobly tests to verify Android features. To learn the basics of using Mobly, see the Mobly tutorial.
You can also use the Mobly Snippet Lib to build custom test APKs for triggering device-side code from the host.
Mobly features
The Mobly test framework provides the following features:
Flexible test organization
Mobly is a standalone library, on which users can build different test suites. Mobly users are isolated from other users' changes.
Users can add dependencies to project-specific test suites without impacting other users.
Mobly snippets lets users create custom test APKs with only the APIs relevant to the test. This minimizes the file size overhead of test APKs.
Simple to maintain and debug
Mobly provides informative test results including test and snippet stacktraces, and per-test-iteration results for repeated or retried tests.
The Mobly codebase is covered by presubmit unit tests, and enforces unit test coverage for new code contributions, which reduces the risk of code errors.
Mobly snippet APKs can run without privileged access, which allows testing on a large number of platforms.
Example Mobly tests
The following are examples of Mobly tests for Android features:
- Test for Wi-Fi Direct
- Test for CompanionDeviceManager