testing-patterns

Guide unit, integration, and mocking strategies for structured software testing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/thimmarques/gestao-inteligente --skill testing-patterns-thimmarques
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/thimmarques/gestao-inteligente/tree/main/.agent/skills/testing-patterns
Command: npx skills add https://github.com/thimmarques/gestao-inteligente --skill testing-patterns-thimmarques

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Designing and maintaining reliable test suites is hard without a clear, repeatable framework that covers unit, integration, and mocking strategies.

Core Features & Use Cases

  • Testing Pyramid: guidance on balancing unit, integration, and E2E tests to optimize reliability and speed.
  • AAA Pattern: structured Arrange-Act-Assert approach to test readability and maintenance.
  • Test Type Selection: criteria for choosing unit vs integration vs end-to-end tests for different components.
  • Mocking Principles: strategies for stubs, fakes, and spies to isolate logic.
  • Best Practices & Anti-Patterns: guidelines to craft robust tests and avoid common pitfalls.

Quick Start

Document and implement a testing pattern for your project by starting with a unit-principles checklist.

Frequently Asked Questions about testing-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure unit tests and integration tests using the AAA pattern?

Structure unit and integration tests using the Arrange-Act-Assert pattern to separate setup, execution, and verification phases. This testing approach improves readability and simplifies maintenance of your test suites.

What is the testing pyramid and how does it balance unit and integration tests?

The testing pyramid balances unit, integration, and end-to-end tests to optimize reliability and speed. It provides a repeatable framework that prioritizes fast unit tests as the foundation, reducing slow E2E test overhead.

When should I use mocking strategies like stubs and fakes in unit tests?

Use mocking strategies like stubs, fakes, and spies in unit tests to isolate logic from external dependencies such as API layers and service integrations. This ensures tests remain fast, repeatable, and focused on specific components.

What are common testing anti-patterns and best practices to avoid them?

Testing anti-patterns include unstructured test organization and poor data strategies. Follow best practices like the AAA pattern and mocking principles to craft robust tests, avoid common pitfalls, and improve software reliability.

How do I choose between unit tests and integration tests for frontend components?

Choose unit tests for frontend components to verify isolated logic quickly, and integration tests to validate interactions across API layers and service integrations. Use test type selection criteria to match the component scope.

Do I need a specific testing framework to apply these mocking principles?

No specific testing framework is required. The mocking principles and testing patterns apply across software projects, providing framework-agnostic strategies for stubs, fakes, and spies to isolate logic and maintain clear test organization.