testing-integration-boundaries
Skill1 starsChanged 3 months agoMITView on GitHub
Use when code crosses a database, filesystem, queue, network API, process, or module boundary and isolated tests cannot prove serialization, persistence, protocol, or failure behavior.
In this repository65 other files it gives its agents.
- analyzing-change-blast-radiusSkill
- analyzing-developer-career-opportunitiesSkill
- art-directing-web-interfacesSkill
- assessing-developer-proficiencySkill
- auditing-dependency-riskSkill
- auditing-pixel-perfect-frontendSkill
- bootstrapping-modern-web-appsSkill
- brag-slimSkill
- building-brand-guidelinesSkill
- building-conversion-product-pagesSkill
- building-developer-career-roadmapsSkill
- building-hybrid-game-assetsSkill
- building-premium-nextjs-interfacesSkill
- building-project-showcasesSkill
- building-regression-testsSkill
- building-reliable-node-api-boundariesSkill
- choosing-application-architectureSkill
- craft-premium-motionSkill
- creating-character-sprite-pipelinesSkill
- defining-brand-strategySkill
- designing-action-combatSkill
- designing-developer-portfolio-evidenceSkill
- designing-relational-data-modelsSkill
- designing-software-boundariesSkill
- designing-test-strategiesSkill
- designing-ui-systemsSkill
- designing-visual-identitiesSkill
- documenting-architecture-decisionsSkill
- editing-for-clarity-and-toneSkill
- engineering-gsap-animationsSkill
- evaluating-developer-proficiencySkill
- evolving-postgres-schemas-safelySkill
- humanizing-generated-proseSkill
- implementing-reference-faithful-uiSkill
- investigating-codebase-semanticallySkill
- managing-implementation-slicesSkill
- mapping-existing-codebase-structureSkill
- naming-brands-and-productsSkill
- optimizing-frontend-motion-performanceSkill
- orchestrating-cinematic-web-motionSkill
- planning-codebase-changes-with-evidenceSkill
- planning-engineering-workSkill
- planning-launch-distributionSkill
- planning-safe-refactorsSkill
- planning-written-communicationSkill
- preparing-project-launchSkill
- profiling-postgres-query-performanceSkill
- reconstructing-images-as-threejsSkill
- reviewing-api-securitySkill
- reviewing-apple-platform-interfacesSkill
- reviewing-pull-requestsSkill
- reviewing-web-securitySkill
- selecting-working-methodsSkill
- shipping-github-vercel-changesSkill
- teaching-developer-conceptsSkill
- testing-playable-gamesSkill
- testing-web-applications-end-to-endSkill
- threat-modeling-applicationsSkill
- tracing-code-execution-pathsSkill
- translating-figma-to-nextjsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
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 9
Test the boundary that can actually break.
- Distinctive: line 14
Use the real dependency when it is local and controllable: a real database engine, filesystem, queue, or service instance.
- Distinctive: line 23
If a fake represents an external service, keep its contract narrow and periodically verify it against the real provider or an explicit …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing Integration Boundaries
Core principle
Test the boundary that can actually break. Prefer a narrow integration test with the real controllable dependency over a broad system test or a mock that merely repeats your assumptions.
Boundary workflow
- Name the boundary and its contract: request/response shape, persisted state, message schema, file format, transaction semantics, or side effect.
- Identify which behavior belongs to your code and which belongs to the dependency. The test should prove the interaction between them, not re-test either implementation exhaustively.
- Use the real dependency when it is local and controllable: a real database engine, filesystem, queue, or service instance. Use a faithful fake or dedicated test environment only when the real dependency cannot reasonably run in the test environment.
- Trigger the boundary through the smallest public entry point that exercises the integration.
- Assert on observable outcomes: stored rows, emitted messages, parsed responses, returned errors, committed/rolled-back state, or externally visible side effects.
- Exercise representative failure behavior where the contract requires it: malformed data, unavailable dependency, timeout, duplicate delivery, constraint violation, partial write, retry, or rollback.
- Isolate test data and cleanup. A test must not depend on execution order or residue left by another test.
Mocking rule
A mock is useful for an interaction you intentionally do not want to integrate in this test. It is not evidence that your production serializer, driver, schema, query, HTTP client, or database constraint works.
If a fake represents an external service, keep its contract narrow and periodically verify it against the real provider or an explicit contract test.
High-value boundaries
Prioritize code that:
- serializes or deserializes data;
- writes or reads persistence;
- crosses process or network boundaries;
- publishes or consumes events;
- relies on transactions or consistency guarantees;
- translates external errors into product behavior.
Verification
A passing integration test should let you answer: “What real boundary behavior did this prove that a unit test could not?” If the answer is only that a mock received a call, move the evidence closer to the real boundary.
References
- Martin Fowler, Integration Test: https://martinfowler.com/bliki/IntegrationTest.html
- Martin Fowler / Ham Vocke, The Practical Test Pyramid: https://martinfowler.com/articles/practical-test-pyramid.html
- Google Testing Blog, Test Sizes: https://testing.googleblog.com/2010/12/test-sizes.html
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.

