test: add --shards option to mobile e2e tests#686
Open
kacperzolkiewski wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces sharding support for Maestro mobile E2E runs by booting multiple simulators/emulators and splitting flow execution across them, aiming to reduce end-to-end test runtime.
Changes:
- Added a
--shards Noption to the Maestro test runner script and wired it to Maestro’s device sharding (--shard-split). - Updated iOS simulator and Android emulator setup scripts to boot multiple devices and output
DEVICE_IDSfor downstream orchestration. - Optimized installation for multi-device runs by reusing a single build artifact across shard devices.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .maestro/scripts/setup-ios-simulator.sh | Boot and configure multiple iOS simulators; emit DEVICE_ID/DEVICE_IDS. |
| .maestro/scripts/setup-android-emulator.sh | Boot and configure multiple Android emulators with per-shard AVDs/ports; emit DEVICE_ID/DEVICE_IDS. |
| .maestro/scripts/run-tests.sh | Add --shards flag, compute/clamp shard count, set up multiple devices, install app across shards, and run Maestro with --shard-split. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a
--shardsflag to the Maestro test runner. The default value is1.To speed up test execution, you can split the test suite across multiple emulators. For example:
yarn test:e2e:android --shards 3yarn test:e2e:ios --shards 3This will distribute the Maestro tests across three emulators, reducing the overall execution time.
When I run tests for example on iOS with 3 shards it reduces the time from 14min to 5min.
Test Plan
yarn test:e2e:android --shards Nyarn test:e2e:ios --shards NWith different N value
yarn test:e2e:androidyarn test:e2e:iosTests should run on single emulator like before this PR
Screenshots / Videos
Screen.Recording.2026-07-08.at.12.23.41.mov
Compatibility
Checklist