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

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.

agentmods
npx agentmods add rules/pueraeternis/agentic-project-template/11-testing-standards
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00005 $0.00580
Opus 5 $0.00003 $0.00290
Sonnet 5 $0.00001 $0.00116
Haiku 4.5 $0.00001 $0.00058

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

.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. 4d 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 2mo ago), licensed MIT. It adds 5 tokens to every session and 580 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-08-31.