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.
git clone --depth 1 https://github.com/ivangrynenko/cursorrulesWrote 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/ivangrynenko/cursorrules/testing-guidelines)<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/testing-guidelines"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/testing-guidelines/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.
<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/testing-guidelines"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/testing-guidelines.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00002 | $0.00529 |
| Opus 5.5 | $0.00001 | $0.00212 |
| Sonnet 5.5 | $0.00000 | $0.00106 |
| Haiku 4.5 | $0.00000 | $0.00053 |
Grade A, and why
testing-guidelines 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.
What it actually says
Revised Cursor Rule File - Testing Guidelines (preserving functionality)
This file outlines testing policies that maintain existing functionality while incorporating best software testing practices.
It enforces separation of production and test code, allows controlled use of test hooks, and defines processes for exceptions and documentation alignment.
rules:
- name: Test-Production Separation
description: "Test code must remain strictly separated from production code."
guidelines:
- "Place test code in dedicated test directories or modules, separate from production code."
- "Allow test-specific helpers or hooks only in a controlled manner (e.g., via clearly isolated interfaces or configurations)."
- "Production code should remain unchanged for testing, unless using approved test extension points."
- name: Testability (Mocks and Stubs)
description: "Enable testability by using mocks and stubs for external dependencies."
guidelines:
- "Prefer dependency injection or interfaces to swap real components with mocks or stubs in tests."
- "Avoid duplicating production logic in test code; tests should call into production code or use simplified mocks rather than reimplementing logic."
- name: Exception Handling
description: "Any necessary modification to production code for testing is an exception and requires review."
guidelines:
- "Document and justify any change made to production code solely for testing purposes."
- "Obtain approval through a formal review process (e.g., code review by senior developers or architects) for such changes."
- "Ensure that any approved change does not alter the intended functionality of the production code."
- name: Documentation Alignment
description: "Align test expectations with existing documentation without modifying production documentation."
guidelines:
- "Write tests to validate behaviors as documented in product or code documentation."
- "If a test reveals a discrepancy between actual behavior and documentation, address it by updating the documentation via the normal process, not by changing production code to fit tests."
- "Keep production code comments and descriptions unchanged during testing; refine tests or documentation instead to resolve mismatches."
- name: Industry Best Practices
description: "Follow industry best practices for software testing with clear boundaries."
guidelines:
- "Clearly delineate test types (unit, integration, end-to-end) and ensure each is executed in appropriate environments."
- "Isolate tests to avoid side effects, and clean up any test data or state after execution."
- "Integrate tests into continuous integration workflows to run automatically without requiring changes to production code."
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.
- 1mo ago First seen · 38 lines · 2 tokens per session scan A 9f36243fee96
testing-guidelines is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (88 stars, last pushed 11mo ago), licensed MIT. It adds 2 tokens to every session and 529 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.
Other cursor rules, from other repositories
rails-cursorrules-prompt-file
Cursor rules for Rails development with basic setup.
jest
Jest: describe/it, matchers, mocking, async testing.
vitest
Vitest: unit testing, mocking, coverage, snapshot testing.
pytest
You are an expert in pytest testing. Follow these rules.
07-testing
Cursor rule "07-testing" from orbitalsonic/AndroidPilot, covering testing, architecture, prefer, unit testing and scope.
llm-test
Guidelines for writing tests for LLM-related functionality.