testing-strategies
Comprehensive testing strategy covering unit, integration, e2e, property-based, and mutation testing with practical patterns
npx skills add cosmicstack-labs/mercury-agent-skills --skill testing-strategies --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.
# Testing Strategies A comprehensive approach to testing that gives you confidence your code works correctly — from unit tests to mutation testing. ## Core Principles ### 1. Test Behavior, Not Implementation Your tests should specify what the code does, not how it does it. Tests that pass after a refactor (with the same behavior) are good tests. Tests that break after a refactor (with the same behavior) are brittle tests. ### 2. The Test Pyramid Is a Guideline, Not a Rule Write many fast unit tests, some integration tests, and a few end-to-end tests. But adjust ratios based on your context: a data pipeline needs more integration tests; a UI component needs more visual regression tests. ### 3. Tests Are Code — Treat Them That Way Tests need the same care as production code: clean naming, DRY helpers, proper abstractions. Test code that's hard to maintain leads to tests that get deleted. ### 4. Confidence Is the Goal Coverage numbers are a proxy metric. A codebase with 80% coverage and excellent tests is better than one with 100% coverage and shallow tests. Test the things that scare you. --- ## Testing Maturity Model | Level | Unit Tests | Integration Tests | CI Integration | Qualit
- Core Principles
- 1. Test Behavior, Not Implementation
- 2. The Test Pyramid Is a Guideline, Not a Rule
- 3. Tests Are Code — Treat Them That Way
- 4. Confidence Is the Goal
- Testing Maturity Model
- Actionable Guidance
- Unit Testing Patterns
- Mocking and Fakes
- Integration Testing
- End-to-End Testing
- Property-Based Testing
- Mutation Testing
- Test Coverage That Matters
Run mutation testing mutmut run --paths-to-mutate src/ Review surviving mutants mutmut results Show a surviving mutant mutmut show 1 # Shows mutant #1 diff
What does the testing-strategies skill do?
Comprehensive testing strategy covering unit, integration, e2e, property-based, and mutation testing with practical patterns
How do I install it?
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill testing-strategies --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 cosmicstack-labs/mercury-agent-skills, a repository with 364 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.