testing-patterns

Guide software testing patterns across unit, integration, and end-to-end tests.

Updated Aug 5, 2025
One-click install
npx skills add https://github.com/lehuuhau1231/TechJobs --skill testing-patterns-lehuuhau1231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/lehuuhau1231/TechJobs/tree/main/tech-job-client/.agent/skills/testing-patterns
Command: npx skills add https://github.com/lehuuhau1231/TechJobs --skill testing-patterns-lehuuhau1231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill equips you with advanced testing patterns and principles, helping you design and implement reliable and efficient test suites.

Core Features & Use Cases

  • Testing Pyramid: Provides guidance on how to balance between different types of tests.
  • AAA Pattern: Ensures a structured way of setting up tests with clear steps.
  • Test Types: Identifies the best test types for different scenarios, from unit tests to end-to-end tests.
  • Unit Test Principles: Highlights best practices for writing effective unit tests.
  • Integration Test Principles: Discusses what to test in integration and best practices.
  • Mocking Principles: Provides strategies for effective mocking.

Quick Start

Read through the testing patterns outlined in the 'SKILL.md' to understand and implement the best practices in your next 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 testing pyramid and how does it balance different test types?

The testing pyramid balances unit, integration, and end-to-end tests by weighting the majority of tests at the unit level for fast feedback, fewer integration tests for module interaction, and minimal end-to-end tests for full system validation.

How do I structure software tests using the AAA pattern?

The AAA pattern structures tests into clear steps: Arrange the preconditions and inputs, Act on the target behavior, and Assert the expected outcomes, ensuring a readable and maintainable test design.

What are the best practices for writing effective unit tests?

Effective unit tests follow best practices by isolating single behaviors, using descriptive names, and validating one logical assertion per test to ensure fast, reliable feedback during software development.

When should I use mocking in integration testing?

Mocking in integration testing should be used to isolate external dependencies and simulate their responses, allowing you to focus testing on the interaction logic and data flow between internal modules without relying on third-party systems.

Can this skill help me choose between unit, integration, and end-to-end tests?

Yes, this skill identifies the best test types for different scenarios, providing clear principles to distinguish when to apply unit, integration, or end-to-end testing based on your specific test design needs.

What to test in integration tests and what to mock?

Integration tests should validate the interaction and data mapping between internal modules, while mocking external dependencies like databases or third-party APIs to prevent flakiness and ensure fast, deterministic test execution.