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.
npx agentmods add skills/halflength-ampleness75/claude-code-recipes/testing-strategynpx skills add halflength-ampleness75/claude-code-recipes --skill testing-strategygit clone --depth 1 https://github.com/halflength-ampleness75/claude-code-recipesWrote 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/skills/halflength-ampleness75/claude-code-recipes/testing-strategy)<a href="https://agentmods.dev/skills/halflength-ampleness75/claude-code-recipes/testing-strategy"><img src="https://agentmods.dev/badge/skills/halflength-ampleness75/claude-code-recipes/testing-strategy.svg" alt="Measured on agentmods" 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.00000 | $0.01972 |
| Opus 5 | $0.00000 | $0.00986 |
| Sonnet 5 | $0.00000 | $0.00394 |
| Haiku 4.5 | $0.00000 | $0.00197 |
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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Strategy
Testing approach: unit/integration/e2e split, what to test, test structure (AAA pattern), mocking strategies, and coverage targets.
Testing Pyramid
Follow the testing pyramid — more unit tests, fewer integration tests, even fewer e2e tests:
/ E2E \ ~5% — Critical user journeys
/----------\
/ Integration \ ~20% — Module boundaries, API contracts
/----------------\
/ Unit Tests \ ~75% — Functions, components, utilities
/____________________\
| Level | Speed | Scope | Quantity |
|---|---|---|---|
| Unit | Fast (ms) | Single function/component | Many |
| Integration | Medium (seconds) | Module interactions, DB, API | Some |
| E2E | Slow (seconds-minutes) | Full user flows | Few |
What to Test
Always Test
- Business logic and calculations
- Data transformations and mappings
- Validation rules
- Error handling paths
- Edge cases: empty inputs, boundary values, null/undefined
- Public API of modules (exported functions)
- State transitions (reducers, state machines)
- Critical user journeys (e2e)
Don't Test
- Third-party library internals
- Simple getters/setters with no logic
- Framework boilerplate (constructor, lifecycle method existence)
- Implementation details (private methods, internal state shape)
- Constants and configuration values
- CSS styling (use visual regression tools instead)
Test Structure — AAA Pattern
Every test should follow Arrange, Act, Assert:
describe("OrderService", () => {
describe("calculateTotal", () => {
it("applies percentage discount to subtotal", () => {
// Arrange
const items = [
{ name: "Widget", price: 25.00, quantity: 2 },
{ name: "Gadget", price: 15.00, quantity: 1 },
];
const discount = { type: "percentage", value: 10 };
// Act
const total = calculateTotal(items, discount);
// Assert
expect(total).toBe(58.50); // (50 + 15) * 0.90
});
});
});
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.
- 5d ago First seen · 243 lines · 0 tokens per session scan A f71b4db7452a
testing-strategy is a skill published in the GitHub repository halflength-ampleness75/claude-code-recipes (2 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,972 tokens. 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.
Other skills, from other repositories
test-plan-writing
Write risk-based test plans with coverage matrices, test level decisions, pass/fail criteria, and environment requirements — deciding what to test, at which level, and why.
js-in-html-testing
Test JS logic embedded in HTML using two-layer strategy - Python unit tests + Playwright browser integration tests.
moai-ref-testing-pyramid
Test pyramid strategy, coverage targets, test patterns, and quality metrics reference. Agent-extending skill that amplifies manager-develop test-creation and quality-validation work with production-grade testing patterns. NOT for: production code implementation, architecture design, DevOps, security audits.
memstack-development-test-writer
Use this skill when the user says 'write tests', 'add tests', 'test coverage', 'unit tests', 'integration tests', 'component tests', 'mocking', 'edge cases', or needs to generate tests with proper mocking and edge case coverage. Do NOT use for refactoring plans or database migrations.
test-generator
Generate test templates for unit tests, integration tests, and UI tests using Swift Testing and XCTest. Use when adding tests to iOS/macOS apps.
testing
Vitest and Playwright testing patterns, conventions, and gotchas for this project.