Removed all SL4A related code. Improved test suite mechanism.
- Support test case selection and listing for test suites.
- Support selecting test cases within single test class using regular expressions.
- Record suite meta information in the test summary file.
- Support
fastbootcommand execution with customized binary path. - Support
fastbootcommand execution using the latest serial when the device changes its serial during a test. - Support getting the service alias by service class.
- Removal of all SL4A related code.
- Removal of the
generate_setup_testsstage, which was deprecated in version 1.12.
- Improved the error message for snippet loading errors.
- Updated documents and docstrings.
Maintenance release with small improvements and fixes.
- Introduced
apk_utilsmodule for Android apk install/uninstall.
- Bugs in snippet client.
- Noise in console output on Mac.
Bumping min Python version requirement to 3.11. Modernized the repo's packaging mechanism. Removed legacy code and dependencies.
- Support am instrument options in snippet client.
- Support adb reverse in
AdbProxy. - Improved mechanism for tracking repeat and retry records in test report.
- [Deprecation]
get_available_host_portis now deprecated and will be removed in the next major release. Please rely on the OS to allocate ports.
- Eliminated redundant
fastbootcalls.
Bug fixes and improvements to better support users who construct their own
suite based on test_runner APIs and suite_runner.
- Make print test case name feature usable.
- Ensure default log path exists.
- Missing info in test records are now populated.
- Enable Android devices in bootloader mode to be picked up in registration.
- A logger adapter that makes it easier for modules to add their own log line prefixes
is_emulatorproperty now works for Cuttlefish image- Handle SIGTERM properly
- Fixed missing result fields and output directories
This release introduces the new generic Mobly snippet base client and the new Android snippet client built on top. The new snippet base enables us to better scale Mobly snippets across various platforms.
The old Android snippet client is now considered deprecated, and will be removed in the following release. Please update your code accordingly:
snippet_client->snippet_client_v2snippet_event->mobly.snippet.callback_eventcallback_handler->callback_handler_v2
The generate_setup_tests stage is renamed to pre_run to better reflect its
true role: steps that happen before all the test case methods are finalized.
This is a pure rename with no functional changes. Please migrate your code as
the generate_setup_tests stage will stop working completely in the next
release.
- Added the new Mobly snippet base client.
- Added the new Android snippet client v2 based on the new base client.
- Support changing Mobly's logger level to
DEBUGvia cli arg. - Termination signal type is now included in result records.
- The old Android snippet client is deprecated.
- The
generate_setup_testsstage is nowpre_run.
- Various issues in the Android snippet client.
- Native support for
repeatandretryof test cases. - Additional assertion APIs.
android_devicenow picks upfastbootdevices if given*.
- Removed the usage of
psutilin favor of nativePy3features.
This release focuses on code quality improvement, refactoring, and legacy code removal.
Py2-specific workarounds and deprecated APIs are removed in this release. We are also refactoring to use 2-space indentation and unit test system.
- Framework support for test case level
repeatandretry.
- Removal of Py2 support
- Removal of the
monsooncontroller
- Various improvements in Android device controller
- More metadata collected for test runs
This release contains minor fixes and improvements.
- API for taking screenshots in
AndroidDevice - Option to change the logging verbosity of the Mobly snippet client. The default logging size is now capped.
- Resource leakage in
_print_test_name. - IDE compatibility.
- Bugs in unit tests.
This is likely the last major release that preserves Py2 compatibility.
AndroidDevicenow has a newis_emulatorproperty.- Better multi-user support in
AndroidDevice. - Standardized logging and output file names.
- Improvement in
utils.concurrent_exec. - Support class-based decorator on Mobly test methods.
Due to the standardization of output files for both Mobly and AndroidDevice
controller, if you have custom parser of Mobly outputs, you need to adjust
your parsing logic to accommodate the changes.
- Major change in output directory structure #650
- Names of
AndroidDevice's output files have been standardized #633 - Changed multiple references of
test_bedtotestbedin code #641
AndroidDevice's service manager behavior for reboot and USB disconnect.
Fix readthedocs documentation bug introduced in 1.9. Strictly documentation fix, no code change.
- Support specifying Unique Identifier (UID) for both static and generated test methods.
- Detached logger lifecycle from
TestRunner#run. Suite users have to explicitly use the new logger context aroundTestRunner#run. - Removed the behavior of
BaseTestClassas a context as it has been a no-op for several releases. - [Deprecation] Removed
BaseTestClass#clean_upwhich was deprecated in 1.8.1. - [Deprecation] Code path for passing args directly into a test method, which was never used.
- [Deprecation] Service-related APIs deprecated in 1.8 are now removed,
including
AndroidDevice#load_sl4a.
- Bug fixes and reliability improvements in
AdbProxy. - Improved APIs for taking bugreports
- Improvements in
AndroidDeviceservice management - Improvements in
AndroidDevice'sgetpropcalls, including caching.
- Errors from the final clean up stage are now properly recorded.
- NOTE: This may expose errors that have long existed in your tests. They are usually caused by your test interrupting controller object life cycle management. Fixing these issues would help keep your test env clean.
- Fixed docs config so
http://mobly.readthedocs.ioshow all the classes properly.
- Modularized controller management logic by introducing
ControllerManager. - Introduced the service mechanism in
AndroidDevice, life cycles management of long-running processes for Android devices. - Convenience method for creating per-test adb logcat
logcat.create_per_test_excerpt. AdbErrornow hasserialas a direct attribute.
The following APIs in AndroidDevice are deprecated:
start_services->ad.services.start_allstop_services->ad.services.stop_allstart_adb_logcat->ad.services.logcat_startstop_adb_logcat->ad.services.logcat_stop
expectsAPIs crashing in certain execution stages.setup_class's record is not recorded correctly in summary yaml.- Controller info recoding
- adb logcat crashes
- Only install test dependencies when running the unit tests.
- Allow
CallbackHandler.waitForEventto wait for longer than the max rpc timeout.
Added framework DEBUG level log generated by Mobly:
- Log test configuration at the beginning.
- Log boundaries of each execution stage.
- Log snippet client calls.
- Support suffixing test class name in a suite.
- API to unload a single snippet from
AndroidDevice.
- Fixes in
BaseTestClass. - Fixes for running on Windows.
self.current_test_infonow exists forsetup_classstage.- adb calls through
AdbProxycan now propagate stderr. - Instrumentation runner now outputs timestamp for each test.
- Fix several bugs for running on Windows.
- Support adding additional blocks in test summary file.
SnippetEventis now loggable.
- Fix several bugs in error reporting.
- Fix log persist crashing Mobly on certain devices.
- Allow setting up logger before test class execution. Useful for suites.
- Fix recording of
teardown_classfailures in new output format. - Properly handle calling
asserts.abort_allinon_fail. - Minor fixes for Windows support.
- APIs for specifying expectation in test for delayed test termination.
mobly.expects - A runner class for easily running regular Instrumentation tests with Mobly. Tutorial.
- API to get runtime test info during the test.
- Support specifying file location and timeout in
take_bug_report. - Support changing device serial during test. Needed for remote devices.
- Allow adding custom controller info for
AndroidDevice.
- Monsoon config format change:
Old:
'Monsoon': [123, 456]New:'Monsoon': [{'serial': 123}, {'serial': 456'}]
- Old output files.
- New output file scheme, with better clarity and streamable summary file.
- Improved result reporting: more consistent, more debug info, no hiding errors.
- adb commands now support timeout param.
E.g.
adb.wait_for_device(timeout=10)
- Signature change of procedure functions like
on_fail.- Old:
on_fail(test_name, begin_time) - New:
on_fail(record)
- Old:
- Old generated test code path
- Support for old snippet protocol (v0)
Full list of fixes here.
- Improved compatibility between v1 snippets and older devices/emulators
- Support temporarily disconnecting (without rebooting) Android devices from USB in a test, useful for power measurement.
- Fixes critical bugs from 1.4.1
Warning: This release has multiple issues; please use 1.5.
New
- Support the new launch and connection mechanism in Snippet Lib 1.2.
Fixes
- a bug in
generate_teststhat prevents it to be called when wrapped in other functions. - a bug that exposed Mobly internal controller registry to tests.
Deprecate
- Old snippet launch protocol (V0)
New
- Brand new generated test. See
BaseTestClass.generate_testsPlease switch to new one since we're deprecating the old one. - Support creating test suites where each class has a different config.
- Support usb id as device identifier.
- The token that marks begin and end of the test in logs has changed from
[Test Case]to[Test]. - Launch MBS without package name with
snippet_shell.py --mbs - adb binary location can now be modified by test code.
Fixes
- Clear adb logcat cache before starting collection.
- Use default
adb logcatbuffer. if you need additional logcat buffers, set-b <buffer name>withadb_logcat_paramin the config for AndroidDevice. - Time out sooner when snippet server stops responding.
Deprecate
- Old generated tests (run_generated_tests)
- Support running on Windows.
- Add support for creating test suites.
- Support UIAutomator in snippet.
- Fixes to adb commands to avoid double-quoting and fix cross-platform issues.
- adb commands are now run without local shell. For commands with more
than one argument, pass in a list of arguments instead of a string. Eg
adb.logcat("-c -v")becomesadb.logcat(["-c", "-v"]). utils.start_standing_process()run without local shell by defaultutils.exe_cmd()removed. Usesubprocess.check_output()instead.
- adb commands are now run without local shell. For commands with more
than one argument, pass in a list of arguments instead of a string. Eg
- Fixes critical bugs in 1.2
Warning: This release has multiple issues; please use 1.2.1.
- New config format with clear compartmentalization of different types of configs.
- Utilize yaml format instead of json for new config.
- Added support for Mobly Snippet Lib's Asynchronous Rpc calls.
- Added support for handling async events from async Rpc calls.
- Various improvements and bug fixes.
- Stop making sl4a a default requirement.
- Require explicitly starting sl4a with
AndroidDevice.load_sl4a. - Fix in
android_deviceandsnippet_client - Fix various other minor issues.
- Bug fixes and improvements in AndroidDevice controller.
- Add a client for making Rpc calls to apps built with [Mobly Snippet Library] (https://github.com/google/mobly-snippet-lib).
- Add a controller lib for attenuators.
- Add customizable log prefix tag in AndroidDevice for better device-level logging.