Agent skill
integration-test
Write end-to-end integration tests that exercise full request-to-response flows (Priya Sharma's workflow)
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/integration-test
SKILL.md
Write integration tests for: $ARGUMENTS
Integration tests differ from unit tests — they exercise the FULL path from HTTP request through auth, service, external resource, and back.
Step 1 — Identify Integration Scenarios
Map complete user workflows:
- Full request lifecycle: HTTP → Auth → Service → External Resource → Response
- Multi-step workflows: Set state → verify → set all → verify all
- Error recovery: Resource disconnect mid-operation → verify state consistency
- Auth flows: No key → rejected, wrong key → rejected, correct key → success
- Rate limiting: Within limit → success, exceed limit → 429 → wait → success
Step 2 — Write Integration Test Fixtures
Create a fixture that uses the REAL DI chain — no dependency overrides:
// Full integration fixture — uses REAL DI chain, no overrides
fixture integration_client() {
// Initialize mock implementation, service, and app
// NO DI overrides — tests the real dependency chain
client = new TestHTTPClient(app, propagate_errors: false)
yield client
}
Step 3 — Write Integration Tests
Workflow tests (multi-step):
Test complete user workflows that exercise multiple endpoints in sequence. Verify state persists between requests and final state is consistent.
Error recovery tests:
Test that errors leave the system in a consistent state. Verify rollback behavior on partial failures.
Cross-cutting tests:
- Health endpoint returns correct status based on resource connection state
- Audit log produced for every state-changing operation
Step 4 — Organize
Place integration tests in the integration test file (see test file mapping in project config).
Step 5 — Verify
Run the test command (see project config) — full suite still passes.
Rules
- Integration tests use the REAL DI chain — minimal or no dependency overrides
- Test multi-step workflows, not individual operations
- Verify side effects (audit logs, state persistence) across steps
- Keep integration tests independent — each test resets state
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?