Skip to content

test(e2e): Add TurboModule sample coverage and e2e validation - #6549

Draft
alwx wants to merge 1 commit into
mainfrom
alwx/improvement/6167
Draft

test(e2e): Add TurboModule sample coverage and e2e validation#6549
alwx wants to merge 1 commit into
mainfrom
alwx/improvement/6167

Conversation

@alwx

@alwx alwx commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Uses samples/react-native/tm/ as the canonical fixture for verifying the TurboModule instrumentation stack end to end.

  • NativeSampleModule.add(a, b) (sync, C++) and NativePlatformSampleModule.getPlatform() (async, ObjC/Kotlin) added to the sample specs.
  • New "TurboModule Playground" screen on the Errors tab runs both inside a manual root span, renders the resulting turbo_module.* span attributes on device, and has throw-from-native buttons for the crash-context path.
  • The sample configures turboModuleContextIntegration with its own modules (the default only tracks RNSentry).
  • Maestro flow + Jest e2e test asserting the aggregated and per-method turbo_module.* attributes on the transaction envelope.
  • packages/core micro-benchmark printing per-call wrapper latency with and without tracking into the CI output.

The Maestro flow lives in samples/react-native/e2e/tests/, which runs from sample-application.yml and is already behind the ready-to-merge gate. The benchmark lives in packages/core rather than performance-tests/TestAppSentry/, which only measures app-start time and binary size on Sauce Labs and has no in-app latency harness.

💡 Motivation and Context

Closes #6167

💚 How did you test it?

  • packages/core: yarn jest test/turbomodule (new benchmark prints ~1.1us/call sync, ~1.3us/call async overhead) and the full suite.
  • samples/react-native: tsc --noEmit, oxlint, prettier --check, jest.
  • Native lint: clang-format, ktlint.
  • The new Maestro flow and e2e test have not been run on a device yet.

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

Run the e2e job with the ready-to-merge label to validate the Maestro flow on iOS and Android.

Extends the sample TurboModules with a synchronous `NativeSampleModule.add`
and an asynchronous `NativePlatformSampleModule.getPlatform` so the whole
instrumentation stack can be exercised end to end.

- New "TurboModule Playground" screen on the Errors tab runs both calls inside
  a manual root span, renders the resulting `turbo_module.*` span attributes
  on device and offers throw-from-native buttons for the crash-context path.
- The sample now configures `turboModuleContextIntegration` with its own
  modules instead of relying on the default (which only tracks `RNSentry`).
- Maestro flow plus a Jest e2e test asserting the aggregated and per-method
  `turbo_module.*` attributes on the transaction envelope.
- Micro-benchmark printing the per-call latency of the TurboModule wrapper
  with and without tracking into the CI output.
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • test(e2e): Add TurboModule sample coverage and e2e validation by alwx in #6549
  • fix(expo): resolve plugin config when registered as bare '@sentry/react-native' by antonis in #6543
  • fix(ios): make the RNSentry SPEC CHECKSUM in Podfile.lock machine-independent by alwx in #6534
  • chore(deps): update Android SDK to v8.51.0 by github-actions in #6539
  • chore(deps): update Sentry Android Gradle Plugin to v6.17.0 by github-actions in #6544
  • feat(core): Extend TurboModule instrumentation to legacy NativeModules by alwx in #6504
  • feat(ios): Introduce enableMetricKit option by alwx in #6540

🤖 This preview updates automatically when you update the PR.

@github-actions

Copy link
Copy Markdown
Contributor
Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against 9c09228

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.

Sample app coverage and e2e validation

1 participant