New features including testing on multiple devices in parallel, HTML test report, and stability improvements.
Maestro is back on track
Last few months have not seen a single Maestro release. This changes today.
Give a warm welcome to version 1.37.0 of Maestro!
Parallel execution on many devices
This is a big one — now you can boot up a few emulators and simulators, and run tests on them simultaneously!
The maestro test
command now accepts the --shards
argument, which lets you specify the number of shards (devices) to use for parallel execution of tests.
Let’s say you have 3 running devices and 9 tests. To split this test suite into 3 chunks of tests and run them on connected devices, run:
maestro test --shards 3 <directory-with-flows>
What’s also exciting about this PR is that it’s by far the largest pull request that has been contributed to Maestro by a member of our open-source community. Huge kudos to Kaam!
It’s a powerful feature, and we already have some ideas on how it can be further improved. For more details, see the GitHub issue. We’d also love to hear what you think about it.
Reports in HTML
PR #1750 by Depa Panjie Purnama
In addition to --format JUNIT
, now there’s also a way to generate a simple webpage to see at glance the result of your test run:
maestro test --format HTML flow.yaml
Homebrew is back
Support for installation from Homebrew was removed after v1.36.0. The motivation behind that decision was to have more control over the installation process.
You let us know that decision didn’t make you happy, though. We heard on multiple occasions that you want to have Homebrew back, and so we’re pleased to say that Homebrew is back.
If you’re on macOS and want to switch from curl-installed Maestro to Homebrew install, first rm -rf ~/.maestro
, and then:
brew tap mobile-dev-inc/tap
brew install maestro
To be fair, Homebrew did not stop working, but we recommended installing through the script.
If you prefer the script install (or are not on macOS), don’t worry — it’s not going anywhere soon.
We did our best to make sure we got everything alright. If you encounter any problems with the old/new Homebrew installation method, please let us know either on GitHub or on our community Slack.
And more
That’s already a lot, but not everything.
Current platform exposed in JavaScript
This new feature makes it easier to express logic that depends on the platform the test is running on:
appId: org.wikipedia
# "org.wikimedia.wikipedia" for iOS
---
- launchApp
- runScript: "setSearchTerm.js"
- tapOn: "Search Wikipedia"
- inputText: ${output.searchTerm}
// setSearchTerm.js
output.searchTerm = 'blackberries'
if (maestro.platform == 'android'){
output.searchTerm = 'robots'
}
if (maestro.platform == 'ios'){
output.searchTerm = 'apples'
}
Control airplane mode
There are now 3 new commands that allow for control over airplane mode:
appId: org.wikipedia
---
- launchApp
- setAirplaneMode: disable
- setAirplaneMode: enable
- toggleAirplaneMode
Unfortunately, this feature is Android-only since iOS simulator doesn’t have airplane mode.
Longer screen recording
The built-in screenrecord
binary, present in all Android systems, does exactly what you’d expect it to do — but it has always had a nasty restriction of recordings being limited to 3 minutes. We managed to work around this on emulators powering Maestro Cloud, but the problem still persists for all users who use Maestro locally.
Thankfully, this limit was increased (to half an hour) in Android 14 (API 34), and Maestro takes advantage of it now when running on such a modern emulator.
New killApp command
PR # 1727 by Alexander Gherschon
Maestro now has a new killApp
command, in addition to stopApp
.
On Android, killApp
triggers a System-Initiated Process Death, which is a different kind of death than the one triggered by already-present stopApp
command.
You can kill the currently running app, or specify appId of the app to kill:
appId: org.wikipedia
---
- launchApp
- killApp # kills currently open app
- killApp: com.google.android.apps.maps
On iOS, killApp
is equivalent to stopApp
.
Bug fixes
- Fix cleaning up retries in iOS driver (#1669)
- Fix some commands not respecting custom labels (#1762)
- Fix “Protocol family unavailable” when rerunning iOS tests (#1671)
Better triage
Maestro has become a wildly popular open-source project in a relatively short amount of time, steadily approaching 6k GitHub stars. This is incredibly exhilarating, but with this rapid growth, we are also experiencing an increase in feature requests, bug reports, and community support needs that require additional resources to manage effectively.
Although we do our best to read through all feedback prioritize accordingly, we often just don’t have enough bandwidth to handle that.
It’s a good problem to have, though!
That’s why we’re working on improving our triage process to make it better for us to filter & prioritize the issues you create. We’d also like to provide a faster turnover time for pull requests from external contributors.
As an example, we started using the [good first issue](https://github.com/mobile-dev-inc/maestro/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
label to make it easy for prospective contributors to find things that are suitable for beginners and offer a manageable scope for their initial contributions. We also set up some gentle automations to help manage outdated, stale issues that have no value.
Maestro 1.37.0 also introduces enhanced analytics. This will help us collect data such as JDK and Xcode versions you are using and better understand what’s the safe minimum that Maestro should support. The data we collect is completely anonymous, and you can always opt out by removing the ~/.local/state/maestro/analytics.json
file.
Wrapping up
And that’s it for now. It took a bit, but we hope you’ll like this new Maestro release.
Again, we’d like to thank the amazing members of our open-source community — this release wouldn’t be nearly as exciting without their hard work and grit. You’re the best!
Stay tuned for more updates soon.