testing-patterns

Guide unit, integration, and end-to-end test design with AAA structure and anti-pattern avoidance.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/Icebane84/Synarche_Workshop --skill testing-patterns-icebane84
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/Icebane84/Synarche_Workshop/tree/main/.agent/skills/qa/testing-patterns
Command: npx skills add https://github.com/Icebane84/Synarche_Workshop --skill testing-patterns-icebane84

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

testing-patterns eliminates flaky or confusing test suites by giving you a consistent set of principles for structuring unit, integration, and end-to-end tests.

Core Features & Use Cases

  • Testing pyramid guidance: Balance end-to-end, integration, and unit tests to reduce runtime while maintaining critical coverage.
  • AAA test structure: Standardize tests with Arrange, Act, and Assert so failures are clear and reproducible.
  • Mocking and organization rules: Choose what to mock, how to organize cases, and how to keep test data maintainable.
  • Anti-pattern prevention: Avoid implementation-testing, duplicated setups, and flaky/unclean tests to keep suites trustworthy.

Quick Start

Use the testing-patterns skill to design a new test suite for a feature by writing unit tests with clear Arrange/Act/Assert steps and reserving end-to-end tests for critical user flows.

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 to make failures clear and reproducible?

Structure unit tests using the AAA pattern—Arrange, Act, Assert—to make failures clear and reproducible by separating setup, execution, and verification into distinct steps. This standardized structure keeps test logic transparent and easy to debug when failures occur.

What is the testing pyramid and how do I balance unit, integration, and end-to-end tests?

The testing pyramid balances unit, integration, and end-to-end tests by prioritizing a broad base of fast unit tests, a moderate layer of integration tests, and a narrow top of critical end-to-end tests. This structure reduces suite runtime while maintaining essential coverage for critical user flows.

What are common anti-patterns that cause flaky test suites?

Common anti-patterns causing flaky test suites include testing implementation details, duplicated test setups, and unclean test states. Avoiding these ensures tests remain deterministic, isolated, and trustworthy by focusing on behavior rather than internal code structure.

When should I use mocking in unit tests versus integration tests?

Use mocking in unit tests to isolate individual components by replacing external dependencies like APIs or databases. In integration tests, reduce mocking to verify real interactions between components, reserving end-to-end tests for critical user workflows without mocks.

How do I organize test cases and test data for maintainable test suites?

Organize test cases and test data by applying consistent naming conventions, scoped data setup, and clear organization rules. Maintaining maintainable test suites requires avoiding duplicated setups and keeping test data isolated to prevent cross-test contamination and flaky results.