sentry-cocoa / Tests
AGENTS.md1.1k starsChanged 3 months agoMITView on GitHub
Scope: Tests/**. Also follow root instructions.
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about getsentry/sentry-cocoa
- getsentry/sentry-react-native“(ios only) codepush.restartApp triggers invalid OutOfMemory errors”GitHub · Oct 13, 2021 · 15 reactions
- expo/expo“[SDK 51] Xcode 16 compilation fails on pegged Sentry version”GitHub · Jul 2, 2024 · 14 reactions
- getsentry/sentry-java“JVM Profiling”GitHub · Apr 1, 2023 · 14 reactions
- getsentry/sentry-react-native“missing ucontext64_t type Xcode Version 16.0 (16A242d)”GitHub · Sep 18, 2024 · 8 reactions
- getsentry/sentry-dotnet“Feature: Session Replay support for .NET MAUI”GitHub · Jan 30, 2023 · 8 reactions
The biggest 5 of 13 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 13
Talked about on GitHub (13 times).
On GitHub · 13
- Oct 13, 2021(ios only) codepush.restartApp triggers invalid OutOfMemory errors — getsentry/sentry-react-native15 reactions · 77 comments
- Jul 2, 2024[SDK 51] Xcode 16 compilation fails on pegged Sentry version — expo/expo14 reactions · 12 comments
- Apr 1, 2023JVM Profiling — getsentry/sentry-java14 reactions · 18 comments
- Sep 18, 2024missing ucontext64_t type Xcode Version 16.0 (16A242d) — getsentry/sentry-react-native8 reactions · 2 comments
- Jan 30, 2023Feature: Session Replay support for .NET MAUI — getsentry/sentry-dotnet8 reactions · 9 comments
8 more on GitHub
- Apr 16, 2025RCN Fetch failure: cannot parse response — firebase/firebase-ios-sdk6 reactions · 22 comments
- Nov 4, 2020Version 2.0.0 not building with use_frameworks — getsentry/sentry-react-native6 reactions · 4 comments
- Mar 25, 2024Apple privacy manifest requirements (File timestamp, System boot time & Disk space) — getsentry/sentry-react-native5 reactions · 8 comments
- Mar 25, 2024feat(replay): Add Mobile Replay Alpha — getsentry/sentry-react-native4 reactions · 8 comments
- Oct 22, 2025Session Replay for iOS — getsentry/sentry-dotnet3 reactions · 2 comments
- Sep 24, 2024Public API for manual replay control — getsentry/sentry3 reactions · 10 comments
- Feb 1, 2024[Epic] Mobile Session Replay — getsentry/sentry3 reactions · 2 comments
- Nov 20, 2023Tracing: W3C Trace Context Support — getsentry/team-sdks3 reactions · 9 comments
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- develop-docs/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- Sources/AGENTS.mdAGENTS.md
- TestApps/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- relay-conformance-auditSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Test classes follow <SourceFile>Tests
- Distinctive: line 20
Use iOS tests for iOS-specific or UIKit behavior and for final verification when required by the root matrix
- Very specific: line 21
Use comma-separated test identifiers in ONLY_TESTING for multiple classes
- Very specific: line 25
Use only for SentryNetworkTrackerIntegrationTestServerTests
- Distinctive: line 26
Start the server before the relevant test commands
- Distinctive: line 27
Stop the server after use, including when a test fails
- Distinctive: line 37
Run only the relevant test commands between start and stop
- Very specific: line 46
Do not create implementation tests against header-only SentryHeaders
- Distinctive: line 53
Do not add unreliable tests for paths that cannot be controlled deterministically
- Distinctive: line 54
Document the limitation at the source error-handling site and in the pull request
- Distinctive: line 55
Use the narrowest deterministic lower-level validation when available
- Very specific: line 76
Prefer specific assertions such as XCTAssertEqual, XCTAssertNil, and XCTAssertTrue over bare XCTAssert
- Distinctive: line 77
Prefer self-contained DAMP tests over premature helper abstractions
- Very specific: line 78
Use guard case with XCTFail for pattern matching
- Very specific: line 79
Use XCTUnwrap for optional values and element(at:) for safe array access
- Very specific: line 80
Prefer struct test helpers unless reference semantics are required
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tests
Scope:
Tests/**. Also follow root instructions.
Running Tests
make test-macos FOR_AGENTS=true
make test-macos FOR_AGENTS=true ONLY_TESTING=SentryTests/SentryHttpTransportTests
make test-ios FOR_AGENTS=true
make test-ios FOR_AGENTS=true ONLY_TESTING=SentryTests/SentryHttpTransportTests
make test-ios FOR_AGENTS=true ONLY_TESTING=SentryTests/SentryHttpTransportTests,SentryTests/SentryHubTests
make test-ios FOR_AGENTS=true ONLY_TESTING=SentryTests/SentryHttpTransportTests/testFlush_WhenNoInternet
make test FOR_AGENTS=true
make test-ui-critical- Test classes follow
<SourceFile>Tests - The iOS test suite is slow, so prefer targeted macOS tests for quick iterations when the code and test support macOS
- Use iOS tests for iOS-specific or UIKit behavior and for final verification when required by the root matrix
- Use comma-separated test identifiers in
ONLY_TESTINGfor multiple classes
Test Server
- Use only for
SentryNetworkTrackerIntegrationTestServerTests - Start the server before the relevant test commands
- Stop the server after use, including when a test fails
make -C test-server start-debug
./scripts/sentry-xcodebuild.sh --platform iOS --command test --test-plan Sentry_TestServer
make test-macos FOR_AGENTS=true TEST_PLAN=Sentry_TestServer
make test-macos-v10 FOR_AGENTS=true TEST_PLAN=Sentry_TestServer
make -C test-server stop- Run only the relevant test commands between start and stop
- Envelope snapshots in
Tests/Resources/NetworkEnvelopeSnapshotscompare all keys strictly - On mismatch, use the printed actual envelope JSON to update the snapshot
- Payload changes usually require updating both standard and
-v10snapshots
SentryObjC Tests
- ObjC public API tests belong in
Tests/SentryObjCTestsand importSentryObjC - Swift wrapper tests belong in
Tests/SentryObjCCompatTestsand use@testable import SentryObjCCompat - Do not create implementation tests against header-only
SentryHeaders - Run
make test-macos FOR_AGENTS=true TEST_SCHEME=SentryObjCTests - Target a class with
ONLY_TESTING=SentryObjCTests/SentryObjCOptionsTests - Follow
develop-docs/SENTRY-OBJC.md
Untestable Paths
- Do not add unreliable tests for paths that cannot be controlled deterministically
- Document the limitation at the source error-handling site and in the pull request
- Use the narrowest deterministic lower-level validation when available
Style
Arrange, Act, Assert
func testExample() {
// -- Arrange --
let input = "test"
// -- Act --
let result = transform(input)
// -- Assert --
XCTAssertEqual(result, "TEST")
}- Name tests
test<Function>_when<Condition>_should<Expected>() - Structure tests with the Arrange, Act, Assert markers shown above
- Prefer specific assertions such as
XCTAssertEqual,XCTAssertNil, andXCTAssertTrueover bareXCTAssert - Prefer self-contained DAMP tests over premature helper abstractions
- Use
guard casewithXCTFailfor pattern matching - Use
XCTUnwrapfor optional values andelement(at:)for safe array access - Prefer
structtest helpers unless reference semantics are required - Override SDK dependencies through
SentryDependencyContainer.sharedInstance()when possible
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
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.

