test-strategy-enforcement

Enforce test pyramid discipline and deterministic testing across codebases.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/lgerard314/global-plugin --skill test-strategy-enforcement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-strategy-enforcement
Source: https://github.com/lgerard314/global-plugin/tree/main/plugin/skills/test-strategy-enforcement
Command: npx skills add https://github.com/lgerard314/global-plugin --skill test-strategy-enforcement

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Establishes and enforces robust test strategies across codebases to reduce flaky tests and ensure proper test pyramid discipline.

Core Features & Use Cases

  • Guides test pyramid discipline: defines unit/integration/e2e balance and best practices for typical backend services.
  • Promotes deterministic testing: recommends fake timers, factories, and avoidance of sleeps to ensure reliable tests.
  • Guides mocks and data management: explains when to mock external services vs. run real integrations (e.g., with Testcontainers) and factory-based data.

Quick Start

Apply the test strategy guidelines to your PR workflow to ensure proper test pyramid balance and deterministic tests.

Frequently Asked Questions about test-strategy-enforcement

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

FAQPage Schema
How do I enforce a test strategy to prevent flaky tests in my codebase?

To enforce a test strategy against flaky tests, apply structured guardrails that mandate deterministic testing practices like fake timers, data factories, and the avoidance of sleeps across your unit, integration, and e2e tests.

What is the correct test pyramid balance for backend services?

The correct test pyramid balance for backend services requires defining a strict distribution across unit, integration, and end-to-end testing layers to ensure proper coverage while maintaining fast and reliable execution.

When should I mock external services versus using real integrations in testing?

You should mock external services versus using real integrations based on codified guidelines that determine when to isolate dependencies versus running real integrations, such as using Testcontainers, to maintain test safety.

How do I add deterministic tests to my pull request workflow?

To add deterministic tests to your pull request workflow, apply test strategy guidelines during PR reviews to ensure proper test pyramid balance and verify the usage of factory-based data and appropriate mocking.

What are the limitations of relying on sleeps in integration testing?

The limitations of relying on sleeps in integration testing include introducing flakiness and unreliable execution, which is why enforcing a structured test strategy recommends using fake timers and factory-based data instead.