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,120 stars 207 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
9 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