Skip to content

test: add --shards option to mobile e2e tests#686

Open
kacperzolkiewski wants to merge 8 commits into
mainfrom
@kacperzolkiewski/maestro-runner
Open

test: add --shards option to mobile e2e tests#686
kacperzolkiewski wants to merge 8 commits into
mainfrom
@kacperzolkiewski/maestro-runner

Conversation

@kacperzolkiewski

@kacperzolkiewski kacperzolkiewski commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a --shards flag to the Maestro test runner. The default value is 1.
To speed up test execution, you can split the test suite across multiple emulators. For example:
yarn test:e2e:android --shards 3
yarn test:e2e:ios --shards 3
This 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

  1. Run commands:

yarn test:e2e:android --shards N
yarn test:e2e:ios --shards N
With different N value

  1. Run Commands:

yarn test:e2e:android
yarn test:e2e:ios
Tests should run on single emulator like before this PR

Screenshots / Videos

Screen.Recording.2026-07-08.at.12.23.41.mov

Compatibility

OS Implemented
iOS
Android
Web

Checklist

  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

@kacperzolkiewski kacperzolkiewski changed the title @kacperzolkiewski/maestro runner test: add --shards option to mobile e2e tests Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 N option 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_IDS for 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.

Comment thread .maestro/scripts/run-tests.sh
Comment thread .maestro/scripts/run-tests.sh
Comment thread .maestro/scripts/setup-ios-simulator.sh
Comment thread .maestro/scripts/setup-android-emulator.sh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread .maestro/scripts/setup-android-emulator.sh
Comment thread .maestro/scripts/run-tests.sh
kacperzolkiewski and others added 2 commits July 8, 2026 16:24
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@kacperzolkiewski kacperzolkiewski marked this pull request as ready for review July 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants