Skip to content

chore(e2e): add e2e tests on browserstack via Maestro#56

Merged
gmaclennan merged 47 commits into
mainfrom
e2e-maestro
Jun 11, 2026
Merged

chore(e2e): add e2e tests on browserstack via Maestro#56
gmaclennan merged 47 commits into
mainfrom
e2e-maestro

Conversation

@achou11

@achou11 achou11 commented May 5, 2026

Copy link
Copy Markdown
Member

Closes #61

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

@gmaclennan gmaclennan left a comment

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.

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

Comment thread .github/workflows/e2e-tests.yml
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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should we create a follow-up to address this? Mostly hygenic to prevent uploading test suites to browserstack when the jobs for building + uploading the apps fail

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.

yes

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>
Seems like the older sodium-native (libsodium) was crashing Android v8.1
@socket-security

socket-security Bot commented Jun 10, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @sentry-internal/feedback is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: apps/example/package-lock.jsonnpm/@sentry/react-native@7.13.0npm/@sentry-internal/feedback@10.38.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@sentry-internal/feedback@10.38.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm @sentry/browser is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: apps/example/package-lock.jsonnpm/@sentry/react-native@7.13.0npm/@sentry/browser@10.38.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@sentry/browser@10.38.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm @sentry/core is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: apps/example/package-lock.jsonnpm/@sentry/react-native@7.13.0npm/@sentry/core@10.38.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@sentry/core@10.38.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm @sentry/core is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: backend/package-lock.jsonnpm/@sentry/core@10.53.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@sentry/core@10.53.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm better-sqlite3 is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: backend/package-lock.jsonnpm/@comapeo/map-server@1.1.3npm/better-sqlite3@12.9.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/better-sqlite3@12.9.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm caniuse-lite is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: backend/package-lock.jsonnpm/@sentry/rollup-plugin@5.2.1npm/caniuse-lite@1.0.30001792

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/caniuse-lite@1.0.30001792. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm caniuse-lite is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: backend/package-lock.jsonnpm/@sentry/rollup-plugin@5.2.1npm/caniuse-lite@1.0.30001792

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/caniuse-lite@1.0.30001792. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm caniuse-lite is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: backend/package-lock.jsonnpm/@sentry/rollup-plugin@5.2.1npm/caniuse-lite@1.0.30001792

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/caniuse-lite@1.0.30001792. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm caniuse-lite is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: backend/package-lock.jsonnpm/@sentry/rollup-plugin@5.2.1npm/caniuse-lite@1.0.30001792

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/caniuse-lite@1.0.30001792. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm caniuse-lite is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: backend/package-lock.jsonnpm/@sentry/rollup-plugin@5.2.1npm/caniuse-lite@1.0.30001792

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/caniuse-lite@1.0.30001792. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm typebox is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: backend/package-lock.jsonnpm/@comapeo/map-server@1.1.3npm/typebox@1.1.28

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/typebox@1.1.28. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copilot AI changed the title implement e2e testing with Maestro and Browserstack fix(e2e/ios): add BUILD_LIBRARY_FOR_DISTRIBUTION to Sentry pods for Xcode 26 compatibility Jun 10, 2026
Copilot AI requested a review from gmaclennan June 10, 2026 13:13
gmaclennan and others added 5 commits June 10, 2026 16:10
The Oppo Reno 6-11.0 is no longer supported by Browserstack
* origin/main:
  fix(sentry): make exit telemetry lossless and stop cross-process clobbering (#84)
  feat(sentry): land Phases 6 + 7a — Android exit reasons & iOS MetricKit app-exit telemetry (#72)
  chore(build): use npm list instead of custom traversal to get native module versions (#70)
…ules

npm list --parseable --long appends flag fields (:OVERRIDDEN,
:INVALID, ...) after name@version, so taking the last :-field read
"OVERRIDDEN" for the override-pinned sodium-native@5.1.0. The module
was silently dropped from prebuild download + jniLibs packaging while
the bundled JS still referenced it, crashing every device with
ERR_DLOPEN_FAILED: libsodium-native__5.1.0.so not found.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Xcode 26's Swift compiler hides SentrySDK.startTransaction (used by
SentryNativeBridge) when sentry-cocoa builds from source without
BUILD_LIBRARY_FOR_DISTRIBUTION (getsentry/sentry-cocoa#7950). Set it
on Sentry pod targets from the library config plugin so every
consumer's prebuild gets the workaround, injected inside the existing
post_install block (CocoaPods allows only one post_install hook —
the previous attempt added a second block, which fails pod install).
Register the plugin in the e2e app, which didn't apply it before.

Verified locally with Xcode 26.3: the exact CI archive command now
succeeds, and the Release app boots on the iOS simulator.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gmaclennan gmaclennan changed the title fix(e2e/ios): add BUILD_LIBRARY_FOR_DISTRIBUTION to Sentry pods for Xcode 26 compatibility chore(e2e): add e2e tests on browserstack via Maestro Jun 10, 2026
The backend build reads the Node ABI from android/libnode headers on
every platform. The iOS job only created them on a cache miss (the
download script fetches both platforms); a cache hit restored just
ios/NodeMobile.xcframework, so any rerun failed with ENOENT on
node_version.h. Cache both paths and bump the key so ios-only caches
can't hit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@gmaclennan gmaclennan left a comment

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.

@achou11 this is now passing on CI - the failed tests on Browserstack revealed a bug / incompatibility with older Android version (<9) which is now fixed (needed to rebuild the native deps). I think this is good to merge, it's already proven its worth.

@gmaclennan gmaclennan merged commit a5b6c09 into main Jun 11, 2026
12 checks passed
@gmaclennan gmaclennan deleted the e2e-maestro branch June 11, 2026 11:29
gmaclennan added a commit that referenced this pull request Jun 11, 2026
* main:
  chore(e2e): add e2e tests on browserstack via Maestro (#56)
  fix(sentry): make exit telemetry lossless and stop cross-process clobbering (#84)
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.

e2e tests on real devices via BrowserStack + Maestro

3 participants