testing-patterns

Codify software testing best practices for unit, integration, and end-to-end tests.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/Andrejr82/Caculinha_BI --skill testing-patterns-andrejr82
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/Andrejr82/Caculinha_BI/tree/main/.agent/skills/testing-patterns
Command: npx skills add https://github.com/Andrejr82/Caculinha_BI --skill testing-patterns-andrejr82

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to software testing principles and practices, helping developers write more reliable, maintainable, and high-quality code.

Core Features & Use Cases

  • Testing Pyramid: Understand the ideal distribution of unit, integration, and end-to-end tests.
  • Testing Strategies: Learn about the AAA (Arrange, Act, Assert) pattern and when to use different test types.
  • Mocking Techniques: Discover how to effectively use stubs, spies, and mocks to isolate code.
  • Use Case: A developer needs to ensure their new feature is thoroughly tested. They consult this Skill to understand the best approach for writing unit tests for business logic and integration tests for API endpoints.

Quick Start

Explain the testing pyramid and its importance for building robust software.

Frequently Asked Questions about testing-patterns

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

FAQPage Schema
What is the testing pyramid and how does it organize unit, integration, and e2e tests?

The testing pyramid organizes software tests by distributing the majority as unit tests, followed by fewer integration tests, and a minimal amount of end-to-end tests to ensure code quality and reliability while maintaining fast execution speeds.

How do I use the AAA pattern and mocking techniques to write unit tests for business logic?

Use the AAA pattern by structuring tests into Arrange, Act, and Assert phases, and apply mocking techniques like stubs, spies, and mocks to isolate business logic from external dependencies for accurate unit testing.

When should I write integration tests instead of unit tests for API endpoints?

Write integration tests for API endpoints when you need to verify interactions between multiple components or services, whereas unit tests are better suited for validating isolated business logic and individual function behavior.

What are common software testing anti-patterns that make test suites hard to maintain?

Common software testing anti-patterns include over-mocking, testing implementation details instead of behavior, and lacking clear test organization, all of which degrade code quality and make test suites difficult to maintain over time.

How do I manage test data and assertions for maintainable end-to-end testing?

Manage end-to-end testing data by isolating test states and using clear assertion techniques, ensuring that e2e tests validate critical user flows without becoming brittle or dependent on overlapping data states.