Skip to content

implement e2e testing with Maestro and Browserstack#56

Open
achou11 wants to merge 39 commits into
mainfrom
e2e-maestro
Open

implement e2e testing with Maestro and Browserstack#56
achou11 wants to merge 39 commits into
mainfrom
e2e-maestro

Conversation

@achou11
Copy link
Copy Markdown
Member

@achou11 achou11 commented May 5, 2026

Introduces e2e test automation using Maestro, configured to run as part of CI.

Current workflow diagram (will update as needed):

graph LR
  build-android["Build (Android)\n[skip if draft PR]"]
  build-ios["Build (iOS)\n[skip if draft PR]"]
  upload-test-suite["Upload test suite\n[skip if draft PR]"]
  test-android["Run tests (Android)"]
  test-ios["Run tests (iOS)"]

  build-android -->|app_url| test-android
  build-ios -->|app_url| test-ios
  upload-test-suite -->|test_suite_url| test-android
  upload-test-suite -->|test_suite_url| test-ios
Loading

Relevant links:

TODO:

  • Add another job to the workflow to listen for and report test results
  • Update repo with relevant actions environment variables

@achou11 achou11 marked this pull request as ready for review May 7, 2026 11:26
@achou11 achou11 changed the title WIP: implement e2e testing with Maestro and Browserstack implement e2e testing with Maestro and Browserstack May 7, 2026
Copy link
Copy Markdown
Member

@gmaclennan gmaclennan left a comment

Choose a reason for hiding this comment

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

Just some minor bugs and nits. I'll push changes for these to re-run CI and check it all works.

Comment thread .github/workflows/e2e-tests.yml Outdated
key: nodejs-mobile-${{ env.NODEJS_MOBILE_VERSION }}-ios-${{ hashFiles('scripts/download-nodejs-mobile.sh') }}

- name: Download nodejs-mobile binaries
if: steps.cache-libnode.outputs.cache-hit != 'true'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wrong step id for iOS


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This leaves the browserstack build running. I've added a step to the composite action to stop it on cancel.

Comment on lines +177 to +178
# TODO: Enable when we know this job works
# needs: [build-android, build-ios]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we need to re-enable this now?

gmaclennan and others added 4 commits May 19, 2026 10:58
- Set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60s — the 5s default was
  tripping the CRUD tests that fan out 100 IPC create()/delete() calls
  on slower BrowserStack devices.
- Track every opened project in project-crud and close them in
  afterEach so listeners don't accumulate across tests (was producing
  MaxListenersExceededWarning on SocketMessagePort / LocalPeers and
  slowing later tests).
- Add an `all-tests-done` testID alongside `all-tests-passed` /
  `all-tests-failed` so Maestro can fail fast on a failing run instead
  of waiting for the full timeout.
- Bump Maestro `extendedWaitUntil` to 5 min and assert pass after done.
- Log spec start / pass / fail (with stacks) via console.log so they
  appear under the ReactNativeJS tag in logcat / device logs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The root package.json `prepare` script (`expo-module prepare`, plus
`scripts/check-sentry-cocoa-pin.mjs`) needs to run before the e2e app
prebuilds, otherwise the module's native scaffolding isn't regenerated
and the iOS Pods build fails to resolve `SentrySDK.startTransaction`
through the `Sentry/HybridSDK` module. The `iOS Tests` workflow that
builds `apps/example` runs `npm install` (no `--ignore-scripts`) and
passes — match that.

`patch-package` is already wired up as `postinstall` in both
package.jsons, so the explicit `npx patch-package` calls are redundant
once scripts run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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