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.
npx agentmods add rules/contentstack/contentstack-ios/testinggit clone --depth 1 https://github.com/contentstack/contentstack-iosWrote 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.
[](https://agentmods.dev/rules/contentstack/contentstack-ios/testing)<a href="https://agentmods.dev/rules/contentstack/contentstack-ios/testing"><img src="https://agentmods.dev/badge/rules/contentstack/contentstack-ios/testing.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00386 |
| Opus 5 | $0.00000 | $0.00193 |
| Sonnet 5 | $0.00000 | $0.00077 |
| Haiku 4.5 | $0.00000 | $0.00039 |
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 today.
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.
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 underContentstackTest/. - Test methods:
- (void)test...with descriptive names; group related tests with#pragma marksections 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.jsonin the test bundle (seeContentstackMainTestand similar). Do not commit real tokens; document required keys for local/CI runs.
XCTest usage
- Use
XCTAssert*macros; useXCTestExpectation/waitForExpectationsWithTimeout:for async flows. - Use
setUp/tearDownfor 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.
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.
- today First seen · 34 lines · 0 tokens per session scan A 87473d4ebefd
testing is a cursor rule published in the GitHub repository contentstack/contentstack-ios (3 stars, last pushed 29d 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.
Other cursor rules, from other repositories
use-contract-ir-factories
Use factory functions for creating ContractIR objects instead of manual object creation.
mockito
This guide provides definitive best practices for writing robust, maintainable, and readable unit tests using Mockito with JUnit 5, focusing on modern patterns and common pitfalls.
python-general-coding-standards
应用一般 Python 编码标准,包括类型提示、使用 Pydantic 进行输入验证、后台任务、CORS 处理、安全工具、PEP 8 合规性和全面测试。.
spec-for-ut
Unit testing is essential to ensure the reliability and stability of code, especially for React components and functions. Adhering to best practices and ensuring high test coverage is critical to maintaining a robust codebase.
unit-testing-standards
Cursor rule "unit-testing-standards" from adobecom/da-express-milo, covering unit testing standards, testing philosophy, testing framework stack, test structure patterns and 1. standard test file organization.
project-conventions
Core project conventions for the Uniqlo Sales Alerter.