Skip to content

Conversation

philprime
Copy link
Member

📜 Description

This PR introduces a new Cursor rule file, .cursor/rules/testing.md, which provides comprehensive guidelines for testing within the Sentry Cocoa SDK. The rule outlines standard test structure, emphasizes the Arrange-Act-Assert (AAA) pattern, details fixture usage, and covers naming conventions based on an analysis of existing test files.

💡 Motivation and Context

The primary motivation is to standardize testing practices and provide a clear guide for developers, especially new contributors, on how to structure and write tests. By documenting the prevalent AAA pattern and other common test idioms found in the codebase, this rule aims to improve consistency, readability, and maintainability of tests across the project.

💚 How did you test it?

This change introduces a documentation file (a Cursor rule) based on an analysis of existing test files in the Sentry Cocoa SDK. The content was derived by observing common patterns and best practices already present in the codebase. No code changes were made that require automated tests.

📝 Checklist

You have to check all boxes before merging:

  • 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. (This is a new documentation file)
  • 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.

Open in Cursor Open in Web

Co-authored-by: phil.niedertscheider <[email protected]>
Copy link

cursor bot commented Sep 11, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Document arrange-act-assert testing pattern ([#6141](https://github.com/getsentry/sentry-cocoa/pull/6141))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 6cbd9c6

@philprime philprime self-assigned this Sep 11, 2025
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.

2 participants