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

This was referenced Oct 20, 2026
@runningcode
runningcode force-pushed the no/core-integration-test branch from 23ddeb0 to a75ec72 Compare October 21, 2026 09:19
@runningcode
runningcode force-pushed the no/jul-integration-test branch from f611d40 to 9099a2a Compare October 21, 2026 09:19
@runningcode
runningcode force-pushed the no/core-integration-test branch from a75ec72 to d8615b7 Compare October 21, 2026 11:27
@runningcode
runningcode force-pushed the no/jul-integration-test branch from 9e4aeef to b85c7f8 Compare October 22, 2026 12:40
@runningcode
runningcode force-pushed the no/core-integration-test branch from d8615b7 to 7053644 Compare October 22, 2026 12:40
@runningcode
runningcode force-pushed the no/jul-integration-test branch from b85c7f8 to 9f9979b Compare October 22, 2026 13:31
@runningcode
runningcode force-pushed the no/core-integration-test branch from 7053644 to 14bb678 Compare October 22, 2026 13:31
@runningcode
runningcode force-pushed the no/jul-integration-test branch from 9f9979b to a2e1163 Compare October 22, 2026 14:02
@runningcode
runningcode force-pushed the no/core-integration-test branch from 14bb678 to 8ace21b Compare October 22, 2026 14:02
@runningcode
runningcode force-pushed the no/jul-integration-test branch from a2e1163 to 791e3f3 Compare October 22, 2026 16:02
@runningcode
runningcode force-pushed the no/core-integration-test branch from 8ace21b to 67c6c50 Compare October 22, 2026 16:02
@runningcode
runningcode force-pushed the no/jul-integration-test branch from 791e3f3 to 99a5992 Compare October 23, 2026 08:24
@runningcode
runningcode force-pushed the no/core-integration-test branch 4 times, most recently from d5be157 to ace7cb1 Compare October 23, 2026 11:51
@runningcode
runningcode force-pushed the no/jul-integration-test branch 2 times, most recently from 9f8011b to 1f6e18c Compare October 23, 2026 12:48
@runningcode
runningcode force-pushed the no/core-integration-test branch 2 times, most recently from 1254e97 to be7bcd3 Compare October 23, 2026 13:02
@runningcode
runningcode force-pushed the no/jul-integration-test branch 2 times, most recently from 99502e5 to 988d271 Compare October 23, 2026 13:53
@runningcode
runningcode force-pushed the no/core-integration-test branch from be7bcd3 to 4264fa8 Compare October 23, 2026 13:53
runningcode and others added 3 commits October 23, 2026 17:09
…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>
…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>
…d before exiting

The console samples' system tests ran each sample in its own JVM,
asserted that it exited with 0 within 30 seconds, and relied on the
shutdown hook to send everything, because the samples never flush or
close Sentry. The in-process end-to-end tests flush explicitly, so
neither the clean exit nor the hook's flush was tested any more.

Run a small app in a child JVM that returns from main without flushing,
and check that it exits with 0 and that its event, log and metric
arrive.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@runningcode
runningcode force-pushed the no/jul-integration-test branch from 988d271 to ef54152 Compare October 23, 2026 15:10
@runningcode
runningcode force-pushed the no/core-integration-test branch from 4264fa8 to 8ebabb9 Compare October 23, 2026 15:10

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