testing

testing is a cursor rule for Cursor from contentstack/contentstack-ios. It costs 0 tokens per session (386 once invoked), scanned A, original, MIT.

A set of XCTest rules for testing an iOS SDK. XCTest is Apple's framework for writing automated tests in Swift or Objective-C.

In plain words
What is it for?
Use it when adding or editing unit-style tests, integration-style tests, JSON or plist fixtures, and tests that wait for asynchronous SDK operations.
Why use it?
It keeps test names, fixtures, asynchronous checks, and network-dependent tests consistent. It also helps prevent real access tokens from being committed.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding or editing unit-style tests, integration-style tests, JSON or plist fixtures, and tests that wait for asynchronous SDK operations.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/contentstack/contentstack-ios/testing
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/contentstack/contentstack-ios

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 testing

README.md
[![agentmods](https://agentmods.dev/badge/rules/contentstack/contentstack-ios/testing/github.svg)](https://agentmods.dev/rules/contentstack/contentstack-ios/testing)
Your own site
<a href="https://agentmods.dev/rules/contentstack/contentstack-ios/testing"><img src="https://agentmods.dev/badge/rules/contentstack/contentstack-ios/testing/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 testing

Your own site · 80×15
<a href="https://agentmods.dev/rules/contentstack/contentstack-ios/testing"><img src="https://agentmods.dev/badge/rules/contentstack/contentstack-ios/testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 386 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.00000 $0.00386
Opus 5.5 $0.00000 $0.00154
Sonnet 5.5 $0.00000 $0.00077
Haiku 4.5 $0.00000 $0.00039

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

Security

Grade A, and why

testing 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/testing.mdc · 34 lines

What it actually says

Testing Rules – Contentstack iOS CDA SDK

Apply when writing or editing tests in the ContentstackTest target.

Test naming and layout

  • XCTest case classes: suffix Test (e.g. ContentstackMainTest, QueryResultTest, SyncTest) matching existing files under ContentstackTest/.
  • Test methods: - (void)test... with descriptive names; group related tests with #pragma mark sections where the file already uses that style.

Unit vs integration-style

  • Unit-style: Mock or avoid network where possible; assert parsing, model behavior, and edge cases quickly.
  • Integration-style: Tests that call the live CDA require valid credentials—typically via config.json in the test bundle (see ContentstackMainTest and similar). Do not commit real tokens; document required keys for local/CI runs.

XCTest usage

  • Use XCTAssert* macros; use XCTestExpectation / waitForExpectationsWithTimeout: for async flows.
  • Use setUp / tearDown for fixtures; load JSON or plist resources from [NSBundle bundleForClass:[self class]] when the project uses bundle resources.

Stability

  • Avoid time-dependent assertions unless necessary; prefer reasonable timeouts for network tests.
  • Do not introduce flaky ordering assumptions or shared mutable global state across tests without synchronization.

Coverage

  • The Contentstack scheme enables code coverage for the Contentstack framework target. Add or extend tests when changing production behavior; do not drop coverage for critical paths without replacement tests.
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 · 34 lines · 0 tokens per session scan A 87473d4ebefd

Subscribe to this mod's changes

testing is a cursor rule published in the GitHub repository contentstack/contentstack-ios (3 stars, last pushed 24d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 386 tokens. 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-04.