Skip to content

test(android): [Nav3 Lifecycle 4] Integration tests for lifecycle handoffs - #6307

Open
0xadam-brown wants to merge 1 commit into
feat/part-3-sentry-nav-effect-lifecyclefrom
feat/part-4-sentry-nav-effect-lifecycle
Open

0xadam-brown wants to merge 1 commit into
feat/part-3-sentry-nav-effect-lifecyclefrom
feat/part-4-sentry-nav-effect-lifecycle

Conversation

@0xadam-brown

@0xadam-brown 0xadam-brown commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Nav3 Lifecycle)


📜 Description

Add a Robolectric integration suite that drives real Activity, Fragment, dialog, and ViewPager lifecycle transitions around multiple SentryNavEffect instances.

The tests verify which navigation root owns the shared scope, how state is restored during handoffs, and how navigation transactions behave when roots overlap or disappear.

💡 Motivation and Context

The lifecycle coordinator depends on Android lifecycle and Compose disposal ordering. Exercising framework-managed owners catches integration behavior that isolated coordinator and observer tests cannot model completely.

addresses: JAVA-785

💚 How did you test it?

n/a

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the 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.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

The final PR adds runnable sample scenarios for multi-Activity and multi-Fragment Navigation 3 applications.

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

@linear-code

linear-code Bot commented Oct 20, 2026

Copy link
Copy Markdown

JAVA-274

@sentry

sentry Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.61.0 (1) release

⚙️ sentry-android Build Distribution Settings

@0xadam-brown
0xadam-brown marked this pull request as ready for review October 20, 2026 15:31
@0xadam-brown 0xadam-brown added the sanity-check PR needs a lightweight review for obvious issues label Oct 20, 2026
@0xadam-brown 0xadam-brown changed the title test(android): [Nav3 Lifecycle 4] Cover lifecycle handoffs test(android): [Nav3 Lifecycle 4] Test lifecycle handoffs Oct 20, 2026
@0xadam-brown 0xadam-brown changed the title test(android): [Nav3 Lifecycle 4] Test lifecycle handoffs test(android): [Nav3 Lifecycle 4] Integration tests for lifecycle handoffs Oct 20, 2026
Exercise overlapping SentryNavEffect owners through real Robolectric Activity, Fragment, dialog, and ViewPager lifecycle transitions.\n\nRefs JAVA-274

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant