e2e_tests

e2e_tests is a cursor rule for Cursor from getsentry/sentry-java. It costs 6 tokens per session (413 once invoked), scanned A, original, MIT.

A Java end-to-end testing setup that runs sample applications against a local mock Sentry server and checks the events they send. End-to-end tests verify that multiple parts work together.

In plain words
What is it for?
Use it to run one or all Java SDK system tests, prepare test infrastructure for IDE use, and verify the JSON events received by the local server.
Why use it?
It lets you test the full event flow without sending data to a real Sentry account. The mock server makes received errors, transactions, and logs available for assertions.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to run one or all Java SDK system tests, prepare test infrastructure for IDE use, and verify the JSON events received by the local server.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/getsentry/sentry-java/e2e_tests
About the project

getsentry/sentry-java is a Java and Android software development kit for sending application errors, events, and diagnostic information to Sentry. It is used by developers working with Java, Android, Kotlin, and other JVM-based applications to monitor software behavior. The catalogue rules, skills, instructions, and setting support workflows around this SDK.

getsentry/sentry-java · 1,357 stars · on GitHub · docs.sentry.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/getsentry/sentry-java

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for e2e_tests

README.md
[![agentmods](https://agentmods.dev/badge/rules/getsentry/sentry-java/e2e_tests/github.svg)](https://agentmods.dev/rules/getsentry/sentry-java/e2e_tests)
Your own site
<a href="https://agentmods.dev/rules/getsentry/sentry-java/e2e_tests"><img src="https://agentmods.dev/badge/rules/getsentry/sentry-java/e2e_tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for e2e_tests

Your own site · 80×15
<a href="https://agentmods.dev/rules/getsentry/sentry-java/e2e_tests"><img src="https://agentmods.dev/badge/rules/getsentry/sentry-java/e2e_tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 413 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00006 $0.00413
Opus 5.5 $0.00002 $0.00165
Sonnet 5.5 $0.00001 $0.00083
Haiku 4.5 $0.00001 $0.00041

Measured 1mo ago against content hash c73faa80e7db, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

e2e_tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/e2e_tests.mdc · 29 lines

What it actually says

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.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 29 lines · 6 tokens per session scan A c73faa80e7db

Subscribe to this mod's changes

e2e_tests is a cursor rule published in the GitHub repository getsentry/sentry-java (1,357 stars, last pushed today), licensed MIT. It adds 6 tokens to every session and 413 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.