moai-ref-testing-pyramid

Provides test pyramid ratios, coverage targets, and test patterns for quality validation workflows.

Updated Aug 29, 2026
One-click install
npx skills add https://github.com/Seung-zedd/secure-file-upload --skill moai-ref-testing-pyramid-seung-zedd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: moai-ref-testing-pyramid
Source: https://github.com/Seung-zedd/secure-file-upload/tree/main/.claude/skills/moai-ref-testing-pyramid
Command: npx skills add https://github.com/Seung-zedd/secure-file-upload --skill moai-ref-testing-pyramid-seung-zedd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often struggle to decide how many unit, integration, and E2E tests to write, what coverage targets to set, and which test patterns fit each scenario, leading to slow flaky suites or untested critical logic. ## Core Features & Use Cases - Test Pyramid Guidance: Defines the 70/20/10 unit/integration/E2E distribution with speed, reliability, and maintenance trade-offs per level. - Coverage Targets by Context: Sets concrete goals such as 95%+ for critical business logic, 90%+ for API endpoints, and 0% for generated code. - Pattern Catalog: Documents AAA structure, table-driven tests, mocks, testcontainers, property-based testing, plus TDD RED-GREEN-REFACTOR rules and red flags. - Use Case: When an agent creates tests during a RED-GREEN-REFACTOR cycle, it consults this reference to pick the right pattern, set coverage goals, and avoid anti-patterns like inverted pyramids or flaky tests. ## Quick Start Ask the agent to design a test strategy for a new API endpoint using the testing pyramid reference, including coverage targets and which patterns to apply at each level.

Frequently Asked Questions about moai-ref-testing-pyramid

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

FAQPage Schema
What is the ideal test pyramid ratio for unit, integration, and E2E tests?▼

The recommended distribution is 70% unit tests, 20% integration tests, and 10% E2E tests. Unit tests run fast and give precise feedback, while E2E tests cover only critical user journeys because they are slow and flaky.

How much code coverage should I target for different parts of an application?▼

Target 95%+ for critical business logic, 90%+ for API endpoints, 85%+ for utility functions, 80%+ for UI components, and 60%+ for configuration glue code. Generated code needs no tests at all.

What test patterns work best for integration testing with databases?▼

Use testcontainers for Docker-based real databases, in-memory databases like SQLite for fast tests, HTTP test servers for API endpoints, and fixture loading for consistent seed data. Mock external dependencies at the boundary.

Does 100% code coverage mean the code is well tested?▼

No. Coverage measures execution, not correctness. A test that executes code without meaningful assertions provides zero value, so pair coverage with branch coverage and mutation score targets.

When should I not write unit tests for code?▼

Skip tests for framework internals, third-party library behavior, simple getters and setters, private methods tested directly, and generated code like protobuf output. Test behavior through public APIs instead.