Document how the mobile SDKs can be tested through mocks/fakes.
Core or SDK?
Platform/SDK
Which part? Which one?
Mobile
Description
We do not document very well how to test our mobile SDKs, e.g. to assert if the event has been captured by Sentry. (a recent issue https://github.com/getsentry/sentry-java/issues/2651, dart - https://github.com/getsentry/sentry-dart/issues/1380).
Suggested Solution
We could provide a simple section in docs which describes different strategies of capturing/asserting events, e.g. using beforeSend or bindClient on some platforms, using a fake DSN, etc. etc.
For React Native we could probably get away with linking to sentry-testkit.
For other platforms we could have a shared docs page with code snippets per platform.
Routing to @getsentry/team-mobile for triage, due by (sfo). ⏲️
Just to emphasize, this is not just about the mobile/Android SDK, but also when using Sentry in Java and Kotlin applications on the backend. Thanks!
Let's have a single pseudo-code like code snippet on how this can be done across all SDKs.
Since this reused code/docs, no need for all the platform labels.
We could document similar to what docs.sentry.io/platforms/dotnet/guides/aspnetcore/unit-testing has.
Closed https://github.com/getsentry/sentry-java/issues/3050 in favor of this one.