integration-testing
Skill216 starsChanged 6 months agoMITView on GitHub
Test real system boundaries, not mocks of mocks. Integration tests verify that components work together, not that they work in isolation.
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
8
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 15
After unit tests are passing
- Distinctive: line 16
Before any feature ships to production
- Distinctive: line 17
When testing database, API, or third-party service interactions
- Distinctive: line 31
Use a real test database (not SQLite in-memory if prod uses PostgreSQL).
- Distinctive: line 32
Use contract tests for external APIs — test against a recorded real response.
- Distinctive: line 33
Use test containers for services that would otherwise require mocking.
- Distinctive: line 36
Verify: No internal boundaries are mocked in integration tests.
- Distinctive: line 52
Verify: Test suite passes when run in random order.
“Common” is measured: kept by at least 6 in 10 of the 7 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
Overview
Unit tests verify components work in isolation. Integration tests verify they work together. The gap between these two is where most production bugs hide. This skill ensures integration tests cover the real system boundaries.
When to Use
- After unit tests are passing
- Before any feature ships to production
- When testing database, API, or third-party service interactions
Process
Step 1: Identify Real Boundaries
- Map every boundary in the system: code ↔ database, code ↔ external API, service ↔ service, frontend ↔ backend.
- Rank boundaries by failure impact.
- Integration tests should cover the top 5 highest-impact boundaries.
Verify: Boundary map created. Top 5 prioritized.
Step 2: Test Real, Not Mocked
- Use a real test database (not SQLite in-memory if prod uses PostgreSQL).
- Use contract tests for external APIs — test against a recorded real response.
- Use test containers for services that would otherwise require mocking.
- Mock only: third-party services you can't control, slow services with contract tests already in place.
Verify: No internal boundaries are mocked in integration tests.
Step 3: Test the Happy Path AND Failure Cases
- Happy path: the system works end-to-end for the primary use case.
- Failure cases: database down, API returns 500, timeout, malformed response.
- State verification: after each action, verify the state in the real database.
Verify: At least 1 failure case per boundary is tested.
Step 4: Keep Tests Independent
- Each test cleans up its own state (transactions rolled back, test data deleted).
- Tests don't share state with each other.
- Tests can run in any order.
Verify: Test suite passes when run in random order.
Common Rationalizations (and Rebuttals)
| Excuse | Rebuttal |
| "Unit tests are enough" | Unit tests with mocks test that your mocks work, not your system. |
| "Integration tests are slow" | Slow tests are better than discovering bugs in production. Optimize the setup, not the coverage. |
| "We test in staging" | Staging is not a substitute for automated tests. It's too slow and too manual. |
Verification
- Real boundaries identified and prioritized
- Integration tests use real dependencies (not mocks of internal components)
- Happy path and failure cases tested for each boundary
- Tests are independent (can run in any order)
- Test cleanup is reliable
References
- test-driven-development skill
- references/testing-patterns.md
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- kid-sid/claude-spellbook★ 190same name
- s-morgan-jeffries/apple-mail-mcp★ 104same name
- s-morgan-jeffries/apple-mail-fast-mcp★ 103same name
- elastic/integration-skills★ 16same name
- zyggy-org/zyggy★ 2same name
- caseyng/Claude-skills★ 1same name
- mejbaurbahar/software-tester-skills★ 1same name
- Ronnasayd/aipp★ 1same name
- sipandey/create-agent-room★ 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 repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-qa-run-reviewSkill
- ai-output-validationSkill
- api-designSkill
- ci-cd-pipelinesSkill
- citruscoastaiSkill
- code-explanationSkill
- code-reviewSkill
- context-loadingSkill
- debugging-methodologySkill
- documentationSkill
- error-handlingSkill
- frontend-engineeringSkill
- git-workflowSkill
- goal-driven-executionSkill
- hallucination-preventionSkill
- idea-to-specSkill
- incremental-codingSkill
- meeting-notes-to-tasksSkill
- multi-agent-orchestrationSkill
- observabilitySkill
- performance-optimizationSkill
- production-deploymentSkill
- prompt-injection-defenseSkill
- rag-and-memorySkill
- refactoringSkill
- research-and-summarizeSkill
- security-hardeningSkill
- simplicity-firstSkill
- surgical-changesSkill
- task-decompositionSkill
- test-driven-developmentSkill
- think-before-codingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

