1# Mobly Release History 2 3 4## Mobly Release 1.12.3: Proper Repeat and Retry Reporting 5Bumping min Python version requirement to 3.11. 6Modernized the repo's packaging mechanism. 7Removed legacy code and dependencies. 8 9### New 10* Support am instrument options in snippet client. 11* Support adb reverse in `AdbProxy`. 12* Improved mechanism for tracking repeat and retry records in test report. 13 14### Breaking Changes 15* [Deprecation] `get_available_host_port` is now deprecated and will be removed 16 in the next major release. Please rely on the OS to allocate ports. 17 18### Fixes 19* Eliminated redundant `fastboot` calls. 20 21[Full list of changes](https://github.com/google/mobly/milestone/30?closed=1) 22 23 24## Mobly Release 1.12.2: Improve Support for Custom Suites 25 26Bug fixes and improvements to better support users who construct their own 27suite based on `test_runner` APIs and `suite_runner`. 28 29### Fixes 30* Make print test case name feature usable. 31* Ensure default log path exists. 32* Missing info in test records are now populated. 33* Enable Android devices in bootloader mode to be picked up in registration. 34 35[Full list of changes](https://github.com/google/mobly/milestone/29?closed=1) 36 37 38## Mobly Release 1.12.1: Minor Improvements and Fixes 39 40### New 41* A logger adapter that makes it easier for modules to add their own log line prefixes 42 43### Fixes 44* `is_emulator` property now works for Cuttlefish image 45* Handle SIGTERM properly 46* Fixed missing result fields and output directories 47 48[Full list of changes](https://github.com/google/mobly/milestone/28?closed=1) 49 50 51## Mobly Release 1.12: New Snippet Base Client and a New `pre_run` Stage 52 53This release introduces the new generic Mobly snippet base client and the new 54Android snippet client built on top. The new snippet base enables us to better 55scale Mobly snippets across various platforms. 56 57The old Android snippet client is now considered deprecated, and will be 58removed in the following release. Please update your code accordingly: 59* `snippet_client` -> `snippet_client_v2` 60* `snippet_event` -> `mobly.snippet.callback_event` 61* `callback_handler` -> `callback_handler_v2` 62 63The `generate_setup_tests` stage is renamed to `pre_run` to better reflect its 64true role: steps that happen before all the test case methods are finalized. 65This is a pure rename with no functional changes. Please migrate your code as 66the `generate_setup_tests` stage will stop working completely in the next 67release. 68 69### New 70* Added the new Mobly snippet base client. 71* Added the new Android snippet client v2 based on the new base client. 72* Support changing Mobly's logger level to `DEBUG` via cli arg. 73* Termination signal type is now included in result records. 74 75### Breaking Changes 76* The old Android snippet client is deprecated. 77* The `generate_setup_tests` stage is now `pre_run`. 78 79### Fixes 80* Various issues in the Android snippet client. 81 82[Full list of changes](https://github.com/google/mobly/milestone/27?closed=1) 83 84 85## Mobly Release 1.11.1: Support Test Case `repeat` and `retry`. 86 87### New 88* Native support for `repeat` and `retry` of test cases. 89* Additional assertion APIs. 90* `android_device` now picks up `fastboot` devices if given `*`. 91 92### Fixes 93* Removed the usage of `psutil` in favor of native `Py3` features. 94 95[Full list of changes](https://github.com/google/mobly/milestone/26?closed=1) 96 97 98## Mobly Release 1.11: Py2 Deprecation and Repeat/Retry Support 99 100This release focuses on code quality improvement, refactoring, and legacy 101code removal. 102 103Py2-specific workarounds and deprecated APIs are removed in this release. 104We are also refactoring to use 2-space indentation and unit test system. 105 106### New 107* Framework support for test case level `repeat` and `retry`. 108 109### Breaking Changes 110* Removal of Py2 support 111* Removal of the `monsoon` controller 112 113### Fixes 114* Various improvements in Android device controller 115* More metadata collected for test runs 116 117[Full list of changes](https://github.com/google/mobly/milestone/25?closed=1) 118 119 120## Mobly Release 1.10.1: Incremental fixes 121 122This release contains minor fixes and improvements. 123 124### New 125* API for taking screenshots in `AndroidDevice` 126* Option to change the logging verbosity of the Mobly snippet client. The 127 default logging size is now capped. 128 129### Fixes 130* Resource leakage in `_print_test_name`. 131* IDE compatibility. 132* Bugs in unit tests. 133 134[Full list of changes](https://github.com/google/mobly/milestone/24?closed=1) 135 136 137## Mobly Release 1.10: Framework and `AndroidDevice` Output Improvements 138 139*This is likely the last major release that preserves Py2 compatibility.* 140 141### New 142* `AndroidDevice` now has a new `is_emulator` property. 143* Better multi-user support in `AndroidDevice`. 144* Standardized logging and output file names. 145* Improvement in `utils.concurrent_exec`. 146* Support class-based decorator on Mobly test methods. 147 148### Breaking Changes 149Due to the standardization of output files for both Mobly and `AndroidDevice` 150controller, if you have custom parser of Mobly outputs, you need to adjust 151your parsing logic to accommodate the changes. 152 153* Major change in output directory structure #650 154* Names of `AndroidDevice`'s output files have been standardized #633 155* Changed multiple references of `test_bed` to `testbed` in code #641 156 157### Fixes 158* `AndroidDevice`'s service manager behavior for reboot and USB disconnect. 159 160[Full list of changes](https://github.com/google/mobly/milestone/23?closed=1) 161 162 163## Mobly Release 1.9.1: Documentation Fix 164 165Fix readthedocs documentation bug introduced in 1.9. 166Strictly documentation fix, no code change. 167 168[Full list of changes](https://github.com/google/mobly/milestone/22?closed=1) 169 170 171## Mobly Release 1.9: UID Support; `AndroidDevice` and General Runner Improvements 172 173### New 174* Support specifying Unique Identifier (UID) for both static and generated test 175 methods. 176 177### Breaking Changes 178* Detached logger lifecycle from `TestRunner#run`. Suite users have to 179 explicitly use the new logger context around `TestRunner#run`. 180* Removed the behavior of `BaseTestClass` as a context as it has been a no-op 181 for several releases. 182* [Deprecation] Removed `BaseTestClass#clean_up` which was deprecated in 1.8.1. 183* [Deprecation] Code path for passing args directly into a test method, which 184 was never used. 185* [Deprecation] Service-related APIs deprecated in 1.8 are now removed, 186 including `AndroidDevice#load_sl4a`. 187 188### Fixes 189* Bug fixes and reliability improvements in `AdbProxy`. 190* Improved APIs for taking bugreports 191* Improvements in `AndroidDevice` service management 192* Improvements in `AndroidDevice`'s `getprop` calls, including caching. 193 194[Full list of changes](https://github.com/google/mobly/milestone/21?closed=1) 195 196 197## Mobly Release 1.8.1: Fix Final Cleanup Stage Error Capture 198 199### Fixes 200* Errors from the final clean up stage are now properly recorded. 201 * NOTE: This may expose errors that have long existed in your tests. They are 202 usually caused by your test interrupting controller object life cycle 203 management. Fixing these issues would help keep your test env clean. 204* Fixed docs config so `http://mobly.readthedocs.io` show all the classes 205 properly. 206 207 208## Mobly Release 1.8: Controller Management and `AndroidDevice` Service 209 210### New 211* Modularized controller management logic by introducing `ControllerManager`. 212* Introduced the service mechanism in `AndroidDevice`, life cycles management 213 of long-running processes for Android devices. 214* Convenience method for creating per-test adb logcat 215 `logcat.create_per_test_excerpt`. 216* `AdbError` now has `serial` as a direct attribute. 217 218### Deprecated 219The following APIs in `AndroidDevice` are deprecated: 220* `start_services` -> `ad.services.start_all` 221* `stop_services` -> `ad.services.stop_all` 222* `start_adb_logcat` -> `ad.services.logcat_start` 223* `stop_adb_logcat` -> `ad.services.logcat_stop` 224 225### Fixes 226* `expects` APIs crashing in certain execution stages. 227* `setup_class`'s record is not recorded correctly in summary yaml. 228* Controller info recoding 229* adb logcat crashes 230 231[Full list of changes](https://github.com/google/mobly/milestone/18?closed=1) 232 233 234## Mobly Release 1.7.5: Dependency Cleanup 235 236### Fixes 237* Only install test dependencies when running the unit tests. 238* Allow `CallbackHandler.waitForEvent` to wait for longer than the max rpc 239 timeout. 240 241[Full list of changes.](https://github.com/google/mobly/milestone/19?closed=1) 242 243 244## Mobly Release 1.7.4: Better debug logs 245Added framework DEBUG level log generated by Mobly: 246* Log test configuration at the beginning. 247* Log boundaries of each execution stage. 248* Log snippet client calls. 249 250### New 251* Support suffixing test class name in a suite. 252* API to unload a single snippet from `AndroidDevice`. 253 254### Fixes 255* Fixes in `BaseTestClass`. 256* Fixes for running on Windows. 257 258[Full list of changes.](https://github.com/google/mobly/milestone/17?closed=1) 259 260 261## 1.7.3: Windows support fixes 262 263### New 264 * `self.current_test_info` now exists for `setup_class` stage. 265 * adb calls through `AdbProxy` can now propagate stderr. 266 * Instrumentation runner now outputs timestamp for each test. 267 268### Fixes 269 * Fix several bugs for running on Windows. 270 271[Full list of changes.](https://github.com/google/mobly/milestone/16?closed=1) 272 273 274## 1.7.2: Custom Info in Test Summary 275 276### New 277 * Support adding additional blocks in test summary file. 278 * `SnippetEvent` is now loggable. 279 280### Fixes 281 * Fix several bugs in error reporting. 282 * Fix log persist crashing Mobly on certain devices. 283 284[Full list of changes.](https://github.com/google/mobly/milestone/15?closed=1) 285 286 287## 1.7.1: Bug Fixes 288 289### New 290 * Allow setting up logger before test class execution. Useful for suites. 291 292### Fixes 293 * Fix recording of `teardown_class` failures in new output format. 294 * Properly handle calling `asserts.abort_all` in `on_fail`. 295 * Minor fixes for Windows support. 296 297[Full list of changes.](https://github.com/google/mobly/milestone/14?closed=1) 298 299 300## 1.7: Expectation APIs and Instrumentation Test Runner 301 302### New 303 * APIs for specifying expectation in test for delayed test termination. 304 `mobly.expects` 305 * A runner class for easily running regular Instrumentation tests with Mobly. 306 [Tutorial](https://github.com/google/mobly/blob/master/docs/instrumentation_tutorial.md). 307 * API to get runtime test info during the test. 308 * Support specifying file location and timeout in `take_bug_report`. 309 * Support changing device serial during test. Needed for remote devices. 310 * Allow adding custom controller info for `AndroidDevice`. 311 312### Breaking Changes 313 * Monsoon config format change: 314 Old: `'Monsoon': [123, 456]` 315 New: `'Monsoon': [{'serial': 123}, {'serial': 456'}]` 316 317### Deprecated 318 * Old output files. 319 320[Full list of changes.](https://github.com/google/mobly/milestone/13?closed=1) 321 322 323## 1.6.1: New Output 324 325### New 326 * New output file scheme, with better clarity and streamable summary file. 327 * Improved result reporting: more consistent, more debug info, no hiding 328 errors. 329 * adb commands now support timeout param. 330 E.g. `adb.wait_for_device(timeout=10)` 331 332### Breaking Changes 333 * Signature change of procedure functions like `on_fail`. 334 * Old: `on_fail(test_name, begin_time)` 335 * New: `on_fail(record)` 336 337### Deprecated 338 * Old generated test code path 339 * Support for old snippet protocol (v0) 340 341Full list of fixes [here](https://github.com/google/mobly/milestone/12?closed=1). 342 343 344## 1.5: New Snippet Startup Protocol 345 * Improved compatibility between v1 snippets and older devices/emulators 346 * Support temporarily disconnecting (without rebooting) Android devices from 347 USB in a test, useful for power measurement. 348 * Fixes critical bugs from 1.4.1 349 350 351## 1.4.1 [DO NOT USE]: New Snippet Startup Protocol 352 Warning: This release has multiple issues; please use 1.5. 353 354 New 355 * Support the new launch and connection mechanism in Snippet Lib 1.2. 356 357 Fixes 358 * a bug in `generate_tests` that prevents it to be called when wrapped in 359 other functions. 360 * a bug that exposed Mobly internal controller registry to tests. 361 362 Deprecate 363 * Old snippet launch protocol (V0) 364 365 366## 1.4: Generated Test Revamp 367 New 368 * Brand new generated test. See `BaseTestClass.generate_tests` 369 *Please switch to new one since we're deprecating the old one.* 370 * Support creating test suites where each class has a different config. 371 * Support usb id as device identifier. 372 * The token that marks begin and end of the test in logs has changed from 373 `[Test Case]` to `[Test]`. 374 * Launch MBS without package name with `snippet_shell.py --mbs` 375 * adb binary location can now be modified by test code. 376 377 Fixes 378 * Clear adb logcat cache before starting collection. 379 * Use default `adb logcat` buffer. if you need additional logcat buffers, set 380 `-b <buffer name>` with `adb_logcat_param` in the config for AndroidDevice. 381 * Time out sooner when snippet server stops responding. 382 383 Deprecate 384 * Old generated tests (run_generated_tests) 385 386 387## 1.3: Test Suite; Windows Support and Cli Shell Changes 388 * Support running on Windows. 389 * Add support for creating test suites. 390 * Support UIAutomator in snippet. 391 * Fixes to adb commands to avoid double-quoting and fix cross-platform issues. 392 * adb commands are now run without local shell. For commands with more 393 than one argument, pass in a list of arguments instead of a string. Eg 394 `adb.logcat("-c -v")` becomes `adb.logcat(["-c", "-v"])`. 395 * `utils.start_standing_process()` run without local shell by default 396 * `utils.exe_cmd()` removed. Use `subprocess.check_output()` instead. 397 398 399## 1.2.1: New Config Format and Async Rpc Support 400 * Fixes critical bugs in 1.2 401 402 403## 1.2 [DO NOT USE]: New Config Format and Async Rpc Support 404 Warning: This release has multiple issues; please use 1.2.1. 405 406 * New config format with clear compartmentalization of different types of 407 configs. 408 * Utilize yaml format instead of json for new config. 409 * Added support for Mobly Snippet Lib's Asynchronous Rpc calls. 410 * Added support for handling async events from async Rpc calls. 411 * Various improvements and bug fixes. 412 413 414## 1.1.2: SL4A Default No More 415 * Stop making sl4a a default requirement. 416 * Require explicitly starting sl4a with `AndroidDevice.load_sl4a`. 417 * Fix in `android_device` and `snippet_client` 418 * Fix various other minor issues. 419 420 421## 1.1.1: AndroidDevice Controller Improvements 422 * Bug fixes and improvements in AndroidDevice controller. 423 424 425## 1.1: Snippet support 426 * Add a client for making Rpc calls to apps built with [Mobly Snippet Library] 427 (https://github.com/google/mobly-snippet-lib). 428 * Add a controller lib for attenuators. 429 * Add customizable log prefix tag in AndroidDevice for better device-level 430 logging. 431 432 433## 1.0: Initial release 434