11-testing-standards

11-testing-standards is a cursor rule for Cursor from pueraeternis/agentic-project-template. It costs 5 tokens per session (580 once invoked), scanned A, original, MIT.

A general guide for writing and validating software tests, including unit tests, integration tests, and end-to-end tests.

In plain words
What is it for?
Choosing test types, keeping unit tests isolated and deterministic, and checking interactions with databases, APIs, messaging, and workflows.
Why use it?
It helps teams test observable behavior at an appropriate level while avoiding slow, fragile, or overly implementation-specific tests.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Choosing test types, keeping unit tests isolated and deterministic, and checking interactions with databases, APIs, messaging, and workflows.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/pueraeternis/agentic-project-template/11-testing-standards
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/pueraeternis/agentic-project-template

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 11-testing-standards

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/pueraeternis/agentic-project-template/11-testing-standards"><img src="https://agentmods.dev/badge/rules/pueraeternis/agentic-project-template/11-testing-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 580 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.00005 $0.00580
Opus 5.5 $0.00002 $0.00232
Sonnet 5.5 $0.00001 $0.00116
Haiku 4.5 $0.00001 $0.00058

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

Security

Grade A, and why

11-testing-standards 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/11-testing-standards.mdc · 193 lines

How it starts

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


Testing Standards

Testing is an integral part of implementation.

New functionality should be accompanied by appropriate validation.

Project-specific testing requirements are defined in ENGINEERING.md.


Testing Philosophy

Tests should verify:

  • business behavior;
  • domain rules;
  • validation logic;
  • component interactions;
  • observable system behavior.

Avoid testing implementation details.

Prefer behavior over implementation.


Testing Levels

Use the lowest practical testing level.

Typical hierarchy:

  • Unit tests
  • Integration tests
  • End-to-end or system tests

Prefer fast, isolated tests whenever practical.


Unit Tests

Unit tests should:

  • run quickly;
  • be deterministic;
  • test one behavior;
  • avoid external dependencies.

Unit tests should not require:

  • network access;
  • external APIs;
  • production databases;
  • live LLMs;
  • external infrastructure.

Integration Tests

Integration tests verify interactions between components.

Typical examples:

  • persistence;
  • service integrations;
  • API boundaries;
  • external adapters;
  • messaging;
  • workflow execution.

Use isolated environments whenever practical.


Deterministic Testing

Tests should produce identical results on every execution.

Avoid dependencies on:

  • current time;
  • execution order;
  • random values without fixed seeds;
  • mutable external state.

Use fixtures and controlled test data.


Regression Testing

Whenever practical, every bug fix should include a regression test.

Preferred workflow:

Failing Test
      ↓
Implement Fix
      ↓
Passing Test

The regression test should reproduce the original issue.


Validation

Before completing implementation:

  • execute the project's validation commands;
  • run applicable tests;
  • review acceptance criteria;
  • verify repository consistency.

Use the validation workflow documented in ENGINEERING.md.


Test Design

Tests should be:

  • readable;
  • focused;
  • independent;
  • deterministic;
  • maintainable.

Read the full file on GitHub · 193 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. 1mo ago First seen · 193 lines · 5 tokens per session scan A 31b54a280db0

Subscribe to this mod's changes

11-testing-standards is a cursor rule published in the GitHub repository pueraeternis/agentic-project-template (2 stars, last pushed 3mo ago), licensed MIT. It adds 5 tokens to every session and 580 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-08-31.

Related

Other cursor rules, from other repositories

nestjs-testing-guidelines

A set of testing rules for NestJS, a framework for building Node.js server applications. It standardizes Jest tests for controllers and services, plus end-to-end checks for API modules.

holtwood/awesome-cursorrules-zh · 89 tokens

testing-patterns

Testing patterns and best practices for PRPM codebase with Vitest.

pr-pm/prpm · 544 tokens

apollo-custom-hooks

Guidelines for wrapping Apollo Client queries, mutations, and subscriptions in reusable custom React hooks. The hooks can expose data, loading, and error states with TypeScript types.

holtwood/awesome-cursorrules-zh · 0 tokens

python-general-coding-standards

A set of general standards for Python projects, including type hints, input checking, code style, security, web requests, background work, and tests. It also covers FastAPI-specific tasks such as CORS and authentication.

holtwood/awesome-cursorrules-zh · 140 tokens

mobx-best-practices

Guidance for managing shared application state with MobX, a library that updates React interfaces when data changes. It covers observable state, derived values, controlled updates, side effects, dependency injection, and tests.

holtwood/awesome-cursorrules-zh · 0 tokens

true-platform-testing

End-to-end Katalon True Platform testing workflow and lifecycle router. Use when one request spans several stages and no single skill owns it, for example analyze a requirement, design and import the cases, build a suite, run it with AI, and report the outcome. Also use to route any testing request across the 7-stage…

katalon-labs/true-skills · 192 tokens