agentleFS
SentryKnown publishergetsentry/sentry-java/.cursor/rules/e2e_tests.mdc

sentry-java / rules

Cursor rule1.4k starsChanged 7 months agoMITView on GitHub

Java SDK End to End Tests

Trending

Quiet this year.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the getsentry/sentry-java repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about getsentry/sentry-java

The biggest 5 of 18 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 18

Talked about on GitHub (18 times).

On GitHub · 18

13 more on GitHub

The file

Files
e2e_tests.mdc
---
alwaysApply: false
description: Java SDK End to End Tests
---

# Java SDK End to End Tests (System Tests)

The samples in the `sentry-samples` directory are used to run end to end tests against them.

There is a python script (`system-test-runner.py`) that can be used to run one (using `--module SAMPLE_NAME`) or all (using `--all`) system tests.

The script has an interactive mode (`-i`) which allows selection of test setups to execute, whether to run the tests or just prepare infrastructure for testing from IDE.

The tests run a mock Sentry server via `system-test-sentry-server.py`. Any system under test will then have a DSN set that reflects this local mock server like `http://502f25099c204a2fbf4cb16edc5975d1@localhost:8000/0`.
By using this local DSN, the system under test sends events to the local mock server.
The tests can then use `TestHelper` to assert envelopes that were received by the mock server.
`TestHelper` uses HTTP requests to retrieve the JSON payload of the received events and deserialize them back to objects for easier assertion.
Tests can then assert events, transactions, logs etc. similar to how they would appear in `beforeSend` and similar callbacks.

`TestHelper` has a lot of helper methods for asserting, e.g. by span name, log body etc.

The end to end tests either expect the system under test to either be running on a server or call `java -jar` to execute a CLI system under test.

For Spring Boot, we spin up the Spring Boot server. The tests then send requests to that server and assert what is sent to Sentry.

End to end tests are also executed on CI using a matrix build, as defined in `.github/workflows/system-tests-backend.yml`.

Some of the samples are tested in multiple ways, e.g. with OpenTelemetry Agent auto init turned on and off.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.