Skip to content
vudovn avatar

Testing Patterns

Reference guide of testing principles covering the test pyramid, AAA structure, and mocking strategies for reliable suites.

CCM score
39 of 100
skills.sh installs
218
GitHub stars
8.2K
last updated
Jun 3, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the test pyramid, AAA pattern, test type selection, unit and integration principles, mocking, naming, and test data
  • Includes tables for what to unit test versus skip, setup and teardown phases, and stub, spy, mock, and fake types
  • Recommends mocking external APIs, time, and network while avoiding mocks of the code under test and in-memory stores
  • Designed for developers writing unit or integration tests and choosing frameworks or mocking approaches

Install

$ npx -y skills add vudovn/ag-kit --skill testing-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Testing Patterns

Principles for reliable test suites.


1. Testing Pyramid

        /\          E2E (Few)
       /  \         Critical flows
      /----\
     /      \       Integration (Some)
    /--------\      API, DB queries
   /          \
  /------------\    Unit (Many)
                    Functions, classes

2. AAA Pattern

StepPurpose
ArrangeSet up test data
ActExecute code under test
AssertVerify outcome

3. Test Type Selection

When to Use Each

TypeBest ForSpeed
UnitPure functions, logicFast (<100ms)
IntegrationAPI, DB, servicesMedium
E2ECritical user flowsSlow

4. Unit Test Principles

Good Unit Tests

PrincipleMeaning
Fast< 100ms each
IsolatedNo external deps
RepeatableSame result always
Self-checkingNo manual verification
TimelyWritten with code

What to Unit Test

Details

Repository
github.com/vudovn/ag-kit
Category
Testing & QA
First seen
Jun 3, 2026

Questions

What does the testing-patterns skill do?

testing-patterns gives an agent principles for reliable test suites, covering the testing pyramid, the AAA pattern, unit and integration tests, mocking strategies and test data. It applies when writing unit tests, integration tests, choosing testing frameworks or implementing mocking strategies.

How do I install the testing-patterns skill?

Run npx -y skills add vudovn/ag-kit --skill testing-patterns -y in your project to install testing-patterns. Once installed, the agent can use testing-patterns guidance when you write or review tests.

Which tools does the testing-patterns skill use?

testing-patterns is allowed to use Read, Write, Edit, Glob, Grep and Bash. Those are the tools its SKILL.md lists, so the agent can read and change test files and run test commands from the project.

Where does testing-patterns stand in the Testing & QA category?

testing-patterns is listed in the Testing & QA category on Claude Marketplaces, next to tdd, test-driven-development, webapp-testing, migrate-to-shoehorn and break-ui. Its own focus is general testing principles, from unit tests through mocking and test data.

More from vudovn/ag-kit

All 30

Similar to Testing Patterns

More Testing & QA