testing-strategies
Skill3 starsChanged 3 months agoMITView on GitHub
Plans pragmatic test coverage across unit, integration, contract, e2e, visual, accessibility, performance, and smoke tests based on risk and behavior. Use when deciding what to test, designing a test pyramid, adding coverage for a feature, reducing flaky tests, or reviewing QA strategy.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- theexperiencecompany/gaiatheir own version, first seen Nov 3, 2026
- mejbaurbahar/software-tester-skillstheir own version, first seen Oct 13, 2026
- Adhamxon/claude-code-skillstheir own version, first seen Jul 30, 2026
- AgentJDrew/claude-skill-kittheir own version, first seen Jul 6, 2026
- fabioc-aloha/alex-cognitive-architecturetheir own version, first seen Apr 26, 2026
- terrene-foundation/pacttheir own version, first seen Apr 6, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- theexperiencecompany/gaia★ 325same name
- Adhamxon/claude-code-skills★ 2same name
- harrissohail6/claude-code-config★ 1same name
- mejbaurbahar/software-tester-skills★ 1same name
- Typeless-Git/skills★ 1same name
- AgentJDrew/claude-skill-kit★ 0same name
- fabioc-aloha/alex-cognitive-architecture★ 0same name
- terrene-foundation/pact★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- api-designSkill
- backend-craftSkill
- meilisearchSkill
- design-coreSkill
- design-datavizSkill
- design-flowsSkill
- design-formsSkill
- design-product-uiSkill
- design-researchSkill
- design-reviewSkill
- design-slidesSkill
- design-systemsSkill
- design-webSkill
- agent-syncSkill
- build-autonomous-agentsSkill
- coding-disciplineSkill
- completion-gateSkill
- deliver-dependency-upgradesSkill
- documentation-and-adrsSkill
- grill-harness-with-docsSkill
- learn-agentic-engineeringSkill
- pnpmSkill
- scaffold-harnessSkill
- scaffold-monorepoSkill
- shift-left-securitySkill
- start-gateSkill
- update-harnessSkill
- write-a-skillSkill
- frontend-craftSkill
- ansible-automationSkill
- gitea-actionsSkill
- gitea-teaSkill
- manage-infrastructure-as-codeSkill
- multi-stage-dockerfileSkill
- secure-linux-web-hostingSkill
- integrate-product-complianceSkill
- plain-numbersSkill
- product-craftSkill
- run-product-engineeringSkill
- playwright-best-practicesSkill
- writing-coreSkill
- writing-editorialSkill
- writing-engineeringSkill
- writing-marketingSkill
- writing-productSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this when the question is not just "write a test" but "what kind of signal should prove this works?"
- Distinctive: line 19
Read existing test commands, frameworks, CI gates, fixtures, test helpers, and coverage conventions.
- Distinctive: line 22
Prefer the cheapest test that catches the likely regression.
- Distinctive: line 24
Do not chase coverage percentage when behavior risk is elsewhere.
- Distinctive: line 44
Test through public interfaces.
- Distinctive: line 53
Keep test data explicit and local to the test where possible.
- Distinctive: line 65
Run an offline evaluation of an advice, retrieval, or agent system against historical outcomes as of each item's date: only records, …
- Distinctive: line 73
Add regression tests before bug fixes when feasible.
- Distinctive: line 85
Delete or rewrite tests that only assert implementation trivia.
- Distinctive: line 102
no test for auth, migration, or data ownership changes
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing Strategies
Use this when the question is not just "write a test" but "what kind of signal should prove this works?"
Testing starts while framing behavior and risk, not after implementation. Use examples, experiments, threat or failure models, executable checks, and production signals as one continuous learning system.
Project Fit Check
Before planning tests:
- Read existing test commands, frameworks, CI gates, fixtures, test helpers, and coverage conventions.
- Identify the changed behavior, risk, blast radius, and public interface.
- Prefer the cheapest test that catches the likely regression.
- Match the repo's existing layers unless the task is to improve them.
- Do not chase coverage percentage when behavior risk is elsewhere.
Risk To Test Mapping
| Risk | Best signal |
| pure logic | unit test |
| schema or API contract | contract/schema test |
| database/repository behavior | integration test |
| queue/workflow behavior | worker or workflow fixture test |
| user journey | e2e test |
| layout/a11y regression | browser/accessibility test |
| deployment boot path | build or smoke test |
| auth, permissions, or abuse | negative + integration test |
| migration or data integrity | rehearsal + invariant test |
| resilience and operability | failure, load, recovery, or smoke test |
| AI behavior | representative eval + guardrail signal |
Rules
- Test through public interfaces.
- Give behavioral tests explicit Given/When/Then semantics: Given states the relevant preconditions, When applies one meaningful stimulus, and Then asserts observable behavior. Express this through test names, structure, or local helpers; mandatory comments and framework-specific GWT libraries add no value.
- Apply the same semantics to contract, property, migration, load, recovery, and end-to-end tests: controlled context, action or disturbance, observable result or invariant.
- Keep test data explicit and local to the test where possible.
- Mock internals only when the boundary is genuinely external or expensive.
- Synchronize on the work, not on a duration. Where the interface returns before the work it started is finished - a response that begins streaming while the producer keeps writing, a task that outlives the call - wait for that work to complete before asserting. A sleep that passes at 95 ms and fails at 100 ms is not a flaky test; it is a deterministic race the machine's speed decides, and calling it flakiness sends the fix to the wrong place.
- A negative assertion needs an instrument that would notice the positive. "Nothing was fetched" proves nothing when the fake signals the breach by throwing and the code under test catches a failure as an ordinary outcome. Count the reaches on the fake and assert zero.
- Run an offline evaluation of an advice, retrieval, or agent system against historical outcomes as of each item's date: only records, comments, and states that existed before the cutoff, or future knowledge inflates the score. Exclude or flag undated sources. Filter interim or holding replies out of the reference set.
- Trust a model judge's number only after an explicit rubric (including when "unanswerable" is allowed), a check against a second judge, and agreement with human labels.
- Add regression tests before bug fixes when feasible.
- Define the cheapest decisive signal before or with the behavior it guides; do not create a downstream QA handoff.
- Pair pre-release checks with the telemetry and observation window needed to detect production-only failure and outcome drift.
- Autonomous gates return bounded, secret-safe, actionable failure context: identify the failed boundary, concise safe reason, correlated evidence, and retry or rollback decision without exposing secrets, untrusted payloads, or unbounded logs.
- A prototype may prove a learning hypothesis with experiment evidence. It needs production tests and controls before any code is promoted or rebuilt for release.
- Delete or rewrite tests that only assert implementation trivia.
- Track flaky tests as product risk, not background noise.
Review Checklist
- Does the test fail for the bug or risk it claims to cover?
- Does it still pass if internals are refactored safely?
- Is setup smaller than the behavior under test?
- Is the assertion user-, contract-, or system-visible?
- Can CI run it reliably?
Red Flags
- coverage added only by testing private helpers
- brittle snapshots for dynamic UI
- mocks that make the real integration untested
- e2e test used where a unit test would be clearer
- no test for auth, migration, or data ownership changes
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

