testing
Skill1 starsChanged 4 months agoMITView on GitHub
Use when writing tests, deciding what to test, or choosing testing approaches. Practical guidance for test design and strategy.
194 other projects use a version of this.
Adopted by
Most recently taken up by
- siemens/elementtheir own version, first seen Nov 30, 2026
- mphaxise/gstack-port-for-codextheir own version, first seen Nov 29, 2026
- siberiacancode/agent-skillstheir own version, first seen Nov 29, 2026
- rshankras/claude-code-apple-skillstheir own version, first seen Nov 29, 2026
- microsoft/vs-solutionpersistencetheir own version, first seen Nov 29, 2026
- atstaeff/ai-agentstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use bundle-dependency-prs, update-library-template and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillbundle-dependency-prs
Fix broken dependency update PRs and aggregate the ones that work into one PR.
Also in 8 projects that use this
MicrosoftSkillupdate-library-template
Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.
Also in 8 projects that use this
NVIDIA-NeMoSkillbuild-and-dependency
Dev environment setup for Megatron Bridge — container-based development, uv package management, lockfile regeneration, adding dependencies, Slurm container usage, and common build pitfalls.
Also in 3 projects that use this
timmo001Skillchangeset-scope
Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.
Also in 3 projects that use this
JetBrainsSkillmodule-dependencies
Add or modify IntelliJ module dependencies in `.iml` files.
Also in 3 projects that use this
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- modelcontextprotocol/servers★ 92ksame name
- lobehub/lobe-chat★ 86ksame name
- lobehub/lobehub★ 86ksame name
- penpot/penpot★ 63ksame name
- meteor/meteor★ 45ksame name
- iOfficeAI/AionUi★ 34ksame name
- garrytan/gbrain★ 34ksame name
- OpenZeppelin/openzeppelin-contracts★ 27ksame name
- tursodatabase/turso★ 25ksame name
- redis/go-redis★ 22ksame name
184 more not listed
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 repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-browserSkill
- analyze-issueSkill
- animateSkill
- animation-performanceSkill
- animation-vocabularySkill
- apple-designSkill
- ask-emilSkill
- brainstormSkill
- break-uiSkill
- choreographSkill
- code-reviewSkill
- debuggingSkill
- emil-design-engSkill
- executeSkill
- find-animation-opportunitiesSkill
- find-skillsSkill
- frontendSkill
- gather-contextSkill
- gesturesSkill
- impeccableSkill
- improve-animationsSkill
- learn-tasteSkill
- mobile-nativeSkill
- obsidianSkill
- pick-ui-librarySkill
- planSkill
- prototypeSkill
- remove-animationsSkill
- review-animationsSkill
- specSkill
- sync-agentsSkill
- sync-docsSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
6
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 74
Follow the project's existing convention.
- Distinctive: line 99
Use real dependencies when they're fast and deterministic (in-process code, a local test database).
- Distinctive: line 101
Prefer fakes (in-memory implementations) over mocks when possible.
- Distinctive: line 102
If you're mocking more than 2-3 things in one test, test at a different level.
- Distinctive: line 109
Every public API has at least one test
- Distinctive: line 141
Follow the project's existing pattern.
“Common” is measured: kept by at least 6 in 10 of the 175 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
Overview
Practical testing guidance: what to test, how to test it, and when tests matter. Not dogmatic TDD — just enough testing to give you confidence.
Core principle: Tests should give you confidence to ship and refactor without fear.
What to Test
Always Test
- Public APIs and interfaces
- Bug fixes (reproduce the bug first)
- Critical paths: auth, payments, data integrity, security
- Business logic and state transitions
- Edge cases: empty input, null, zero, max values, unicode
Usually Test
- Shared utilities and libraries
- Data transformations and parsers
- Error handling paths
Skip Testing
- Prototypes and spikes (throwaway code)
- One-off scripts
- Pure UI layout tweaks with no logic
- Third-party library behavior (that's their tests)
- Config changes
Test Design
Test Behavior, Not Implementation
# BAD: Tests implementation details
def test_user_service_calls_repository():
mock_repo.get.assert_called_once_with(user_id=1)
# GOOD: Tests observable behavior
def test_get_user_returns_user_when_exists():
result = user_service.get_user(user_id=1)
assert result.name == "Justin"One Concept Per Test
# BAD: One giant test
def test_checkout():
# tests empty cart
# tests invalid item
# tests successful checkout
# tests total calculation
pass
# GOOD: Separate tests
def test_checkout_empty_cart_returns_error():
...
def test_checkout_invalid_item_returns_error():
...
def test_checkout_successful_returns_order():
...Test Naming
Follow the project's existing convention. If no precedent:
test_[unit]_[scenario]_[expected]Examples:
test_login_invalidPassword_returns401test_checkout_emptyCart_returnsErrortest_parse_validJson_returnsObject
Test Types — When to Use What
| Type | When | Speed |
| Unit | Pure logic, utilities, edge cases | Fast |
| Integration | API endpoints, database operations, service interactions | Medium |
| E2E | Critical user flows, cross-service behavior | Slow |
Default to integration tests for application code. Unit tests for pure logic.
Most bugs happen at integration boundaries, not inside pure functions.
Mocking Guidelines
- Use real dependencies when they're fast and deterministic (in-process code, a local test database).
- For external services (APIs, queues), wrap them behind your own interface and fake that interface in tests. Don't mock third-party library internals — the mock encodes your guess about code you don't own.
- Prefer fakes (in-memory implementations) over mocks when possible.
- If you're mocking more than 2-3 things in one test, test at a different level.
Coverage Philosophy
Aim for confidence, not a number.
You have enough coverage when:
- Every public API has at least one test
- Error paths are tested
- Edge cases are covered
- You can refactor without fear
You don't have enough when:
- You're afraid to change code because tests might break
- You can't answer "what happens if this fails?"
- Bug fixes keep appearing in the same area
Test Organization
Mirror the source structure:
src/
auth/
login.ts
logout.ts
tests/
auth/
login.test.ts
logout.test.tsCo-locate when the project prefers it:
src/
auth/
login.ts
login.test.tsFollow the project's existing pattern.
Common Mistakes
| Don't | Do Instead |
| Test implementation details | Test observable behavior |
| Write tests after "just to have them" | Write tests that verify something specific |
| Mock everything | Use real deps when practical |
| Chase 100% coverage | Cover what matters |
| Write brittle tests (tight coupling) | Test the contract, not the internals |
| Skip testing error paths | Test what happens when things fail |
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.

