testing

testing is a cursor rule for Cursor from neuromechanist/research-skills. It costs 7 tokens per session (781 once invoked), scanned A, original, BSD-3-Clause.

A testing guide that requires real implementations, data, services, databases, and file systems instead of mocks or fake inputs.

In plain words
What is it for?
Use it to design integration tests against real APIs, databases, files, and sample data.
Why use it?
It avoids tests that only confirm your assumptions and miss failures where parts of the system meet. If real dependencies are unavailable, it recommends waiting until a real test setup exists.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to design integration tests against real APIs, databases, files, and sample data.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/neuromechanist/research-skills/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/neuromechanist/research-skills

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/neuromechanist/research-skills/testing.svg)](https://agentmods.dev/rules/neuromechanist/research-skills/testing)
Your own site
<a href="https://agentmods.dev/rules/neuromechanist/research-skills/testing"><img src="https://agentmods.dev/badge/rules/neuromechanist/research-skills/testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 781 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.00007 $0.00781
Opus 5 $0.00003 $0.00391
Sonnet 5 $0.00001 $0.00156
Haiku 4.5 $0.00001 $0.00078

Measured 4d ago against content hash 6296e0f2f200, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 4d 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.

plugins/project/templates/cursor/core_rules/testing.mdc · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Standards

Core Philosophy: Test Reality, Not Fiction

Why NO MOCKS? Mocks test your assumptions, not your code. Real bugs hide in integration points, not unit logic. Better approach: No test is better than a false-confidence mock test.

Core Principle: NO MOCKS, NO FAKE DATA

STRICT RULE: Never use mocks, stubs, or fake datasets. If real testing isn't possible, don't write tests.

  • No mock objects - Use real implementations
  • No mock datasets - Use actual sample data
  • No stub services - Connect to real test instances
  • Alternative: Ask user for sample data or test environment setup

When to Write Tests

  • DO: Test with real data and actual dependencies
  • DO: Use test databases with real schemas
  • DO: Test against actual file systems
  • DON'T: Write tests if only mocks would work
  • DON'T: Create artificial test scenarios

Test Structure

tests/
  conftest.py          # Real test fixtures
  sample_data/         # Actual data samples (user-provided)
    valid/
    invalid/
  integration/         # Tests with real dependencies
    test_database.py   # Real DB connection
    test_api.py        # Real API calls

Frameworks (Language-Specific)

  • Python: pytest with real fixtures
  • JavaScript: vitest or jest (no mocking libs)
  • Database: Use test DB with real migrations
  • APIs: Test against staging/local instances

Writing Real Tests (Think About Value)

# GOOD: Tests actual behavior
def test_user_creation(real_db):
    """Tests that users are actually persisted."""
    user = User.create(email="[email protected]")
    # This catches: ORM issues, DB constraints, connection problems
    assert real_db.query(User).filter_by(email="[email protected]").first()

# BAD: Tests nothing meaningful
# def test_user_creation(mock_db):  # NO!
#     mock_db.return_value = User()  # Tests that Python works?

Ask: What am I actually testing? Would this catch real bugs?

Read the full file on GitHub · 96 lines

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. 4d ago First seen · 96 lines · 7 tokens per session scan A 6296e0f2f200

Subscribe to this mod's changes

testing is a cursor rule published in the GitHub repository neuromechanist/research-skills (45 stars, last pushed 5d ago), licensed BSD-3-Clause. It adds 7 tokens to every session and 781 once invoked, about $0.0000 per session on Opus 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-04.