testing-patterns

Guide automated testing with pyramid, AAA, mocks, and data strategies.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/marablemarcel/Living-Lytics --skill testing-patterns-marablemarcel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/marablemarcel/Living-Lytics/tree/main/living-lytics/.agent/skills/testing-patterns
Command: npx skills add https://github.com/marablemarcel/Living-Lytics --skill testing-patterns-marablemarcel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Testing patterns and principles help teams build reliable, maintainable test suites by providing structured guidelines for organization, selection of test types, and robust mocking strategies across projects.

Core Features & Use Cases

  • AAA pattern: clear Arrange-Act-Assert structure for deterministic tests.
  • Testing Pyramid: balance between Unit, Integration, and E2E tests to optimize feedback and speed.
  • Mocking & Test Data: guidance on stubs, spies, and data strategy for stable tests.
  • Test Organization & Anti-Patterns: naming, grouping, and avoiding flaky tests.

Quick Start

Run this skill on a representative codebase and have it organize tests by applying the AAA pattern, the Testing Pyramid, and appropriate test types for your project.

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 using the Arrange Act Assert pattern?

The AAA pattern structures tests into three phases: setting up data, executing behavior, and verifying outcomes. This deterministic approach isolates variables and clarifies expected results for reliable software testing.

What is the best way to balance unit, integration, and end-to-end tests?

The Testing Pyramid optimizes test suites by balancing unit, integration, and end-to-end tests. It prioritizes fast, isolated, and deterministic unit tests as the foundation to ensure rapid feedback across software projects.

When should I use mocks and stubs in integration testing?

Use mocks, stubs, and spies during integration testing to isolate dependencies and control data strategy. This approach ensures stable, deterministic tests by preventing external side effects from causing flaky behavior.

How do I fix flaky tests and avoid common testing anti-patterns?

Fix flaky tests by organizing test suites with strict naming, logical grouping, and robust data strategies. Avoiding testing anti-patterns ensures tests remain fast, isolated, and deterministic across execution environments.

Does this testing guidance apply to any specific programming language or framework?

This automated testing guidance applies across languages and frameworks. It provides practical guidelines and concrete decisions for selecting test types and data strategies independent of specific platform constraints.