testing-patterns

Document software testing patterns including the pyramid and AAA structure.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to software testing patterns and principles, helping developers write more robust, reliable, and maintainable test suites.

Core Features & Use Cases

  • Testing Pyramid: Understand the ideal distribution of unit, integration, and E2E tests.
  • AAA Pattern: Learn the Arrange, Act, Assert structure for clear tests.
  • Test Types: Guidance on when to use unit, integration, and E2E tests.
  • Mocking Strategies: Principles for effective use of stubs, spies, and mocks.
  • Test Organization: Best practices for naming, grouping, and data management.
  • Use Case: A developer can use this Skill to quickly reference best practices for writing unit tests for a new feature, ensuring high code coverage and maintainability.

Quick Start

Use the testing-patterns skill to learn about the testing pyramid.

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 should I distribute unit and integration tests?▼

The AAA pattern structures tests into Arrange, Act, and Assert phases, ensuring your test logic remains clear, isolated, and maintainable across both unit and integration testing scenarios.

When should I use mocking strategies like stubs, spies, and mocks in my tests?▼

Use mocking strategies like stubs, spies, and mocks to isolate components during unit testing, ensuring tests remain fast and self-checking without relying on external dependencies or complex integration setups.

What are common software testing anti-patterns and how do I avoid them?▼

Common testing anti-patterns include slow execution, shared state between tests, and unclear assertions; avoiding them involves following structured patterns for test organization, data management, and isolated testing.

How do I select the right test type for a new software feature?▼

Select test types by evaluating feature scope: use unit tests for isolated logic, integration tests for module interactions, and end-to-end tests for critical user paths to ensure high code coverage and maintainability.

What are the best practices for test organization and data management?▼

Test organization best practices involve consistent naming conventions, logical grouping by feature, and isolated test data management to create fast, repeatable, and timely test suites that are easy to maintain.