testing-strategy

Testing strategy focusing on API validation over automated tests. Use analyzefeature after implementation, fix errors, then test via API requests. Apply when: feature complete, post-implementation validation, API testing, avoiding unnecessary test file creation.

Cursor rule

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/felipebarcelospro/igniter-js/testing-strategy
Clone the repo
git clone --depth 1 https://github.com/felipebarcelospro/igniter-js
Per session 933 This file is loaded in full into every session.
When invoked 933 The same file — it is already loaded in full.
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.00933 $0.00933
Opus 5 $0.00466 $0.00466
Sonnet 5 $0.00187 $0.00187
Haiku 4.5 $0.00093 $0.00093

Measured today against content hash a5c9e91ba873, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing-strategy 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.

packages/mcp-server/testing-strategy.mdc · 142 lines

How it starts

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

Testing Strategy & Validation Protocol

Core Testing Philosophy

PREFERRED APPROACH: API Testing over Automated Tests

  • DO: Use analyze_feature + make_api_request for validation
  • DON'T: Create automated tests unless explicitly requested by user
  • 🎯 GOAL: Validate functionality through real API calls, not test files

Post-Implementation Workflow

1. Feature Analysis (MANDATORY)

After implementing any feature, ALWAYS run:

analyze_feature({
  featurePath: "src/features/user-management", // or single file
  projectRoot: "auto-detect",
  includeStats: true
})

This provides:

  • 📁 Complete file structure and organization
  • 🔍 TypeScript error detection and counts
  • 📊 File statistics (size, lines, types)
  • 🌐 API endpoint discovery
  • 💡 Specific recommendations for next steps

2. Error Resolution (IF NEEDED)

If analyze_feature shows errors (needs_attention status):

  1. Fix TypeScript errors using code investigation tools
  2. Re-run analysis to verify fixes
  3. Store insights as memories for future reference

3. API Validation Testing

Once feature is healthy, test via API calls:

// For each endpoint discovered by analyze_feature
make_api_request({
  method: "POST",
  url: "/api/users",
  body: { name: "Test User", email: "[email protected]" },
  headers: { "Content-Type": "application/json" }
})

4. Results Documentation

Store successful patterns:

store_memory({
  type: "api_mapping",
  title: "User Management API Testing Results",
  content: "Endpoints tested, successful requests, validation patterns",
  tags: ["api", "testing", "user-management"],
  confidence: 0.9
})

When to Create Automated Tests

ONLY create automated tests when:

  • ✅ User explicitly requests test files
  • ✅ User mentions "vitest", "jest", "test files"
  • ✅ User says "write tests for this"
  • ✅ Complex business logic needs unit testing
  • ✅ Library/utility functions need testing

Read the full file on GitHub · 142 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. today First seen · 142 lines · 933 tokens per session scan A a5c9e91ba873

Subscribe to this mod's changes

testing-strategy is a cursor rule published in the GitHub repository felipebarcelospro/igniter-js (242 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 933 tokens to every session, about $0.0047 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-01.