testing-strategies

Guides systematic test design across unit, integration, and E2E levels using the testing pyramid.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/fabioc-aloha/AlexAgent --skill testing-strategies-fabioc-aloha
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-strategies
Source: https://github.com/fabioc-aloha/AlexAgent/tree/main/plugin/skills/testing-strategies
Command: npx skills add https://github.com/fabioc-aloha/AlexAgent --skill testing-strategies-fabioc-aloha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often over-test with slow E2E suites or under-test critical logic, leading to flaky CI pipelines, wasted effort, and bugs slipping through. This Skill provides a systematic framework for choosing the right test at the right level. ## Core Features & Use Cases - Testing Pyramid Guidance: Allocates test volume across unit (70%), integration (20%), and E2E (10%) levels with clear anti-pattern warnings. - Mocking and Coverage Rules: Defines what to mock versus what not to mock, and interprets coverage ranges to avoid chasing meaningless percentages. - Mission-Critical Patterns: Applies NASA/JPL Power of 10 testing patterns for bounded behavior, assertion coverage, and critical path testing. - Use Case: When reviewing a pull request with only E2E tests, use this Skill to restructure the suite into fast unit tests for logic, integration tests for API contracts, and a minimal set of E2E smoke tests. ## Quick Start Ask the AI to load the testing-strategies skill and design a test plan for your current module.

Frequently Asked Questions about testing-strategies

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

FAQPage Schema
How do I structure unit, integration, and E2E tests?▼

Follow the testing pyramid: roughly 70% fast unit tests for logic and edge cases, 20% integration tests for API contracts and data flow, and 10% E2E tests for critical user journeys. Avoid the inverted pyramid, which causes slow and flaky CI.

What should I mock in unit tests?▼

Mock external HTTP APIs, databases in unit tests, time, file system, and random values because they are slow or non-deterministic. Never mock your own business logic or pure functions, since that tests the mocks instead of the code.

How much test coverage is enough?▼

Coverage between 50-70% is reasonable for most projects, while 70-85% shows diminishing returns. The more meaningful metric is coverage of changed code in each pull request, since 100% coverage without real assertions is useless.

Why are my tests flaky and how do I fix them?▼

Flaky tests usually stem from timing races, environment differences between CI and local machines, test pollution from shared state, or hardcoded timeouts. Fix them with proper waits, pinned versions, isolated setup/teardown, and event-based synchronization.

When should I not use TDD?▼

TDD works best for well-understood requirements where the red-green-refactor cycle guides incremental design. For exploratory code where the design is still unstable, write tests after the implementation settles to avoid constant test rewrites.