Skip to content

test(core): [Sample Tests 32] Add an end-to-end test of the core APIs over the HTTP transport - #6324

Draft
runningcode wants to merge 3 commits into
no/jul-integration-testfrom
no/core-integration-test
Draft

runningcode wants to merge 3 commits into
no/jul-integration-testfrom
no/core-integration-test

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Adds SentryEndToEndTest to sentry. It ports the core part of sentry-samples-console's system test, which ran the sample's JAR against the Python mock server. The test reports through the APIs an app uses without integrations, and checks what reaches MockSentryServer over the real HTTP transport:

  • a message at the scope's FATAL level and one at an explicit WARNING level;
  • an exception with its feature flag;
  • an event with a fingerprint and the DEBUG level;
  • a breadcrumb from an event processor, and none from the one a beforeBreadcrumb callback rejects;
  • ten events in a row, all of which arrive (the sample accepted five);
  • a transaction with a child span;
  • metrics, with the scope's attributes.

The sample's test also checks a profile and runs a Kafka round trip. Those go to sentry-async-profiler and sentry-kafka in the next two PRs, and the last one retires the sample.

The test's name avoids …IntegrationTest, which in this module means a test of an SDK Integration.

After a coverage audit against the sample's tests:

  • The exception check also asserts its type, RuntimeException, as the sample did.

💡 Motivation and Context

Core's unit tests mock the transport. This test is the one place where core's own APIs, with no framework integration, go through serialization and HTTP to a server. It runs in 0.2 seconds.

💚 How did you test it?

  • The test passes.
  • Expecting a different fingerprint makes it fail.

📝 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 console sample's profiling into sentry-async-profiler, then its Kafka round trip into sentry-kafka.

#skip-changelog

🤖 Generated with Claude Code

…nsport

SentryEndToEndTest reports through the APIs an app uses without
integrations and checks what reaches MockSentryServer: messages at the
scope's and an explicit level, an exception with its feature flag, an
event with a fingerprint, breadcrumbs from an event processor and a
beforeBreadcrumb callback, ten events in a row, a transaction with a
child span, and metrics with the scope's attributes.

It ports the core part of the console sample's system test, which ran
the sample's JAR against the Python mock server. The sample's profiling
and Kafka parts follow in their own modules.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 20, 2026
@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

runningcode and others added 2 commits October 20, 2026 21:04
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…n type end to end

The console sample's test checked that the captured exception arrives
with its type, RuntimeException, not just its value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant