test-strategy

Solid

Test pyramid decision matrix, coverage targets, when to write which test type, mock vs real dependency decisions, and test ROI analysis.

AI & Automation 552 stars 45 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 91/100

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

Skill Content

# 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 or tmp dir, then clean up. Is it time / Date.now()? → Always mock. Use Jest fakeTimers or freezegun (Python). Is it a third-party SDK wrapper you wrote? → Skip testing the wrapper itself, test your code's behavior. ``` ...

Details

Author
vibeeval
Repository
vibeeval/vibecosystem
Created
8 months ago
Last Updated
6 days ago
Language
C#
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Listed

testing-strategy

Choose the right test type for every change — unit, integration, contract, end-to-end, property-based, mutation, fuzz. Use when adding tests to a new feature, deciding what to test for a bug fix, designing a test pyramid for a service, evaluating coverage targets, or untangling a slow test suite. Stack-agnostic; concrete recipes target Python (pytest), TypeScript (Vitest/Jest/Playwright), and Go (table tests + testify). Pairs with clean-code (error-path tests) and observability (CI signal hygiene).

7 Updated today
kouroshez
Testing & QA Listed

testing-strategy

Test strategy and quality engineering — the test pyramid, what to test at each layer, meaningful coverage policy, integration and contract testing, E2E for critical journeys, test data and fixtures, flaky-test control, mutation testing, load and security testing, and CI gating. Use when the user says "tests", "testing", "unit test", "integration test", "E2E", "Playwright", "Cypress", "Jest", "pytest", "coverage", "TDD", "flaky", "mocking", "test data", "how do I test this", "we have no tests" or "the tests keep breaking"; when writing tests for new code; and as a pass in any project audit. By Devleck.

3 Updated 3 weeks ago
Kin9Zeus
Testing & QA Listed

testing-strategy

Test pyramid, coverage targets, and test patterns (unit/integration/E2E). TRIGGER when: planning tests, writing test code, or reviewing coverage. SKIP: quality-gate scoring of plans (use quality-validation); security testing (use security-review-checklists). (Examples use common runners such as pytest and vitest.)

16 Updated 3 days ago
komluk