testing-patterns

Codify unit, integration, and mocking testing patterns with AAA structure.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill codifies established testing patterns to guide teams in crafting reliable unit, integration, and mock-based tests.

Core Features & Use Cases

  • Testing Pyramid Guidance: Clarifies the balance of unit, integration, and E2E tests.
  • AAA and Mocking Principles: Provides standardized Arrange-Act-Assert workflows and mocking strategies.
  • Best Practices: Offers naming, organization, data strategies, and anti-pattern guidance.

Quick Start

Run the testing-patterns skill to review the recommended test structures and examples, and apply them to your project's test suite.

Frequently Asked Questions about testing-patterns

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

FAQPage Schema
What is the Arrange-Act-Assert pattern for unit testing?

The Arrange-Act-Assert (AAA) pattern standardizes unit testing by structuring tests into three phases: setting up data, executing the action, and verifying the result. It enforces a clear, consistent workflow for reliable test suites.

How do I balance unit, integration, and E2E tests using the testing pyramid?

The testing pyramid guides test distribution by prioritizing a broad base of fast unit tests, fewer integration tests, and minimal E2E tests. Following this pattern standardizes test suites and optimizes execution speed across software projects.

What are the best practices for mocking in unit tests?

Best practices for mocking involve using standardized strategies to isolate the system under test by replacing dependencies. Applying consistent mocking principles prevents flaky tests and ensures reliable, maintainable test suites.

How do I fix unreliable and flaky test suites?

Fix unreliable test suites by codifying proven testing patterns like AAA and standardized mocking. Establishing consistent naming, organization, and data strategies eliminates anti-patterns and stabilizes test execution.

What are common testing anti-patterns I should avoid?

Common testing anti-patterns include unbalanced test pyramids, disorganized test data, and poor mocking strategies. Avoid these by enforcing structured approaches with standardized naming and documentation to maintain reliable tests.

Does this testing patterns skill work for integration tests or only unit tests?

Yes, it covers unit, integration, and mock-based tests. It provides standardized workflows, testing pyramid guidance, and best practices for naming and organization to standardize tests across your entire software project.