test-strategy
Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis.
npx skills add vibeeval/vibecosystem --skill test-strategy --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Test Strategy ## Test Pyramid Ratio Guidance ``` /\ /e2e\ ~10% — critical user flows only /------\ / integ \ ~20% — API contracts, DB interactions /------------\ / unit \ ~70% — pure logic, transformations, edge cases /--------------\ ``` Keep the pyramid right-side-up. Inverting it (too many e2e) leads to slow, flaky CI. ## Decision Matrix: Task Type → Test Type | Task Type | Test Type | Tool | |-----------|-----------|------| | Pure function / utility | Unit | Jest / Vitest | | API endpoint | Integration | Supertest / httpx | | Critical user flow | E2E | Playwright | | Data transformation | Property-based | fast-check / Hypothesis | | React/Vue component | Component | Testing Library | | CLI command | Integration | execa + assertions | | Database query | Integration (real DB) | jest + pg / pytest | | Cron job / scheduler | Unit (mocked time) | Jest fakeTimers | ## Mock vs Real Dependency Decision Tree ``` Is it an external API (Stripe, Sendgrid, etc.)? → YES: Always mock. Use recorded fixtures or MSW. Is it a database? → Unit test context: mock (in-memory store or jest.fn()) → Integration test context: real DB (test container or local) Is it the file system? → Mock with memfs o
- Test Pyramid Ratio Guidance
- Decision Matrix: Task Type → Test Type
- Mock vs Real Dependency Decision Tree
- Coverage Targets by Project Type
- Test Naming Conventions
- Jest / Vitest (describe + it)
- Given-When-Then (BDD style)
- When NOT to Test
- Test Isolation Strategies
- Transaction rollback (PostgreSQL)
- Cleanup hooks
- Test containers (real DB, isolated)
- Flaky Test Triage
- Mutation Testing (Stryker)
npx stryker run
What does the test-strategy skill do?
Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis.
How do I install it?
Run `npx skills add vibeeval/vibecosystem --skill test-strategy --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From vibeeval/vibecosystem, a repository with 521 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
