testing-patterns

Identify and implement cohesive testing patterns across unit, integration, and E2E levels.

1|1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/penghang1223/niannian-workspace --skill testing-patterns-penghang1223
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/penghang1223/niannian-workspace/tree/main/testing-patterns
Command: npx skills add https://github.com/penghang1223/niannian-workspace --skill testing-patterns-penghang1223

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Patterns and guidance to standardize testing across unit, integration, and E2E levels, reducing flaky tests and boosting coverage.

Core Features & Use Cases

  • AAA structure guidance, parameterized tests, test doubles, boundary mocking, test organization, anti-patterns, and coverage strategy.
  • Use cases include establishing a cohesive testing strategy for JS/TS, Python, and Go projects, with example workflows and reference layouts.
  • Real-world example: apply to a mid-size project to design tests that catch bugs early and improve reliability.

Quick Start

Create a minimal unit test using Arrange-Act-Assert for a simple function and then incrementally add coverage.

Frequently Asked Questions about testing-patterns

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

FAQPage Schema
How do I reduce flaky tests across unit, integration, and E2E levels?

Apply cohesive testing patterns like AAA structure, boundary mocking, and structured test organization across unit, integration, and E2E levels to reduce flaky tests and improve reliability.

What is the best way to organize mocking boundaries in unit testing?

Organize mocking boundaries by identifying cohesive test doubles and applying framework-agnostic guidance to isolate units. This prevents external dependencies from causing flaky unit tests and improves coverage.

Does this testing patterns guidance work with Python and Go projects?

Yes, this testing patterns guidance works with Python and Go projects. It provides cross-language examples and framework-agnostic strategies applicable to TypeScript, Python, Go, and more for robust test strategies.

How do I structure a unit test using the Arrange-Act-Assert pattern?

Structure a unit test by separating setup (Arrange), execution (Act), and verification (Assert). Create a minimal test for a simple function, then incrementally add coverage to build a robust testing strategy.

What are common testing anti-patterns I should avoid for better coverage?

Common testing anti-patterns include improper mocking boundaries and disorganized test structures. Avoid these by applying structured guidance on parameterized tests and anti-patterns to standardize testing and boost coverage.

When do I need a cohesive testing strategy for my software project?

You need a cohesive testing strategy when your software project requires robust test strategies to catch bugs early. It standardizes testing across unit, integration, and E2E levels to reduce flaky tests.