moai-ref-testing-pyramid

Featured

Test pyramid strategy, coverage targets, test patterns, and quality metrics reference. Agent-extending skill that amplifies manager-develop test-creation and quality-validation work with production-grade testing patterns. NOT for: production code implementation, architecture design, DevOps, security audits.

Testing & QA 1,143 stars 211 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Testing Pyramid Reference ## Target Agents - `manager-develop` - Primary: applies patterns during test creation and coverage analysis - `manager-develop` - Secondary: applies during RED-GREEN-REFACTOR cycles ## Test Pyramid Ratios ``` / E2E \ 10% — Critical user journeys only /----------\ / Integration \ 20% — API endpoints, DB queries, service boundaries /----------------\ / Unit Tests \ 70% — Functions, hooks, utilities, pure logic /--------------------\ ``` | Level | Speed | Reliability | Maintenance | Coverage Target | |-------|-------|-------------|-------------|-----------------| | Unit | Fast (<100ms) | High | Low | 70% of tests | | Integration | Medium (1-5s) | Medium | Medium | 20% of tests | | E2E | Slow (10-60s) | Lower | High | 10% of tests | ## Coverage Targets by Context | Context | Target | Rationale | |---------|--------|-----------| | Critical business logic | 95%+ | Revenue/security impact | | API endpoints | 90%+ | Contract compliance | | Utility functions | 85%+ | Reuse reliability | | UI components | 80%+ | Rendering correctness | | Configuration/glue code | 60%+ | Low complexity | | Generated code | 0% | Don't test generated code | ## Test Pattern: AAA (Arrange-Act-Assert) ``` // Arrange: Set up test data and preconditions input := CreateTestUser("test@example.com") // Act: Execute the function under test result, err := service.CreateUser(ctx, input) // Assert: Verify the outcome assert.NoError(t...

Details

Author
modu-ai
Repository
modu-ai/moai-adk
Created
10 months ago
Last Updated
today
Language
Go
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Listed

test-strategy

When the user wants to design, audit, or evolve a test strategy — the shape of their test pyramid, the balance of unit / integration / E2E / contract / perf / accessibility tests, what shifts left vs right, what each layer is and isn't responsible for, and how to gate releases. Use when the user mentions "test strategy," "test pyramid," "test trophy," "test ice cream cone," "shift-left," "shift-right," "risk-based testing," "test gates," "balance our test suite," "where to draw the testing line," or "what tests should we write." For specific test-data approach see test-data-management. For environments see test-environment-management. For flake see flaky-test-management.

1 Updated yesterday
aks-builds
Testing & QA Solid

testing

This skill should be used when the user asks to "write tests", "fix failing tests", "improve test coverage", "add integration tests", "debug a flaky test", or reviews test quality. Provides behavior-focused testing patterns, coverage analysis, and detection of brittle test anti-patterns like implementation coupling and non-deterministic assertions.

17 Updated yesterday
dean0x
Testing & QA Listed

principle-testing

Testing strategy and architecture — test pyramid (unit / integration / e2e), test doubles taxonomy (stub / mock / spy / fake), coverage-vs-confidence, mutation testing, flaky-test triage, contract testing, property-based and characterization tests, fixtures and test data builders. Distinct from principle-tdd which covers the red-green-refactor micro-cycle. Auto-load when discussing test strategy, mock vs real dependency, coverage adequacy, test pyramid balance, flaky test diagnosis, contract testing, or test architecture.

3 Updated yesterday
lugassawan