integration-testing
Test a component with its real collaborators or local stand-ins through the repository's integration setup. Use when behavior across a component boundary cannot be proven with isolated unit tests.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- integration-testing
- description
- Test a component with its real collaborators or local stand-ins through the repository's integration setup. Use when behavior across a component boundary cannot be proven with isolated unit tests.
02 资源文件 1
- 参考文档skill.yaml369 B
03 SKILL.md 正文
Integration testing
When to use
When a claim concerns a boundary: data written and read back, a message published and consumed, a remote contract honored, configuration actually loaded, a transaction committed or rolled back.
Required context
The verification profile (how integration tests run, what they need). Useful: the integrations context (which external systems exist and how the project stands them up for tests) and the technology context.
Preconditions
- The project has a way to run integration tests. If the profile marks
integrationas unavailable, record a gap; do not build test infrastructure unasked. - The claim names the boundary under test.
Procedure
- Discover the existing setup: where integration tests live, how collaborators are started (local instances, containers, in-memory stand-ins, recorded responses), how data is seeded and cleaned up, and how tests are kept apart from unit tests.
- Test through the real boundary. Use real collaborators or the project's accepted stand-ins; a double for the very boundary under test defeats the purpose.
- Own the data. Each test creates what it needs and does not depend on data from another test or on execution order. Clean up the same way sibling tests do.
- Cover the failure side of the boundary: the collaborator is unavailable, slow, returns an error or malformed data, or a constraint is violated.
- Keep test configuration separate from real configuration. Credentials for test collaborators come from the environment or the test setup, never from real environments and never written into files.
- Run the tests twice: an unstable result on the second run means shared state or timing problems to fix now.
Tools
None. The command comes from the verification profile.
Rules
core.architecture.follow-existing-patterns: reuse the existing setup rather than
starting collaborators a new way. core.security.no-secrets-in-source applies to test
configuration and seeded data.
Verification
Required: integration.
Evidence
A check result for the integration tests that cover the claim.
Completion criteria
- Each boundary claim has a test that crosses the real boundary.
- Tests pass on repeated runs and in any order.
Failure modes
| Failure | Signal | Response |
|---|---|---|
| Unit test in disguise | The boundary under test is replaced by a double | Use the real collaborator or its accepted stand-in |
| Order dependence | Tests pass alone and fail together | Give each test its own data |
| Environment leak | Tests reach a shared or real environment | Stop; point them at the test setup |
| Slow suite | New tests add large startup cost | Reuse the existing shared setup |
References
None.
04 同仓库更多 Skills
sample-skill
Does a sample task. Use when a sample is needed.
unexplained-contract
Does a sample task. Use when a sample is needed.
shell-block
Does a sample task. Use when a sample is needed.
project-identifier
Does a sample task. Use when a sample is needed.
oversized
Does a sample task. Use when a sample is needed.
no-activation
Does a sample task.