Write integration tests for key workflows
Write integration tests to verify that API routes, services, and database interactions work correctly together in real-world scenarios. Deliverables include test scripts that validate component interactions.
Editor's Note
Ensure a real database (test DB or in-memory) is used in tests rather than mocking everything. Identify key integration points such as API routes calling services, services interacting with the database, and components interacting with state management before writing tests.
When to Use It
- Verify that API routes correctly interact with backend services
- Test database interactions in real environments
- Validate state management interactions in complex UI components
SKILL.md
SkillsHunter provides this listing for informational purposes only. Review the skill’s source, license, and required permissions before use. You are responsible for deciding whether to install or run it. Terms of Use
---
name: integration-testing
description: "Use when reviewing CI coverage, automated checks, or test strategy related to Write integration tests for key workflows. Focus on whether the rule is continuously verified, not just documented."
metadata:
category: testing
priority: high
difficulty: intermediate
estimatedTime: "30"
source: frontendchecklist.io
url: https://frontendchecklist.io/rules/testing/integration-testing
---
# Write integration tests for key workflows
Unit tests verify individual functions in isolation, but they can't catch the bugs that occur when those functions interact — a perfectly correct validation function and a correct database function can still fail when wired together incorrectly. Integration tests catch these wiring bugs before they reach production, where they're expensive to diagnose.
## Quick Reference
- Integration tests verify that multiple units work correctly together
- Test at the boundary where different parts of your system meet
- Use a real database in tests (test DB or in-memory) rather than mocking everything
- Test happy paths and the most critical error paths
## Check
Identify the key integration points in this codebase — where API routes call services, where services interact with the database, and where components interact with state management. Are these tested?
## Fix
Write integration tests for the identified critical paths, testing the interactions between components rather than each in isolation.
## Explain
Explain integration testing, how it differs from unit and E2E testing, and what tools to use for API and component integration tests.
## Code Review
Review tests, CI workflows, and enforcement points related to Write integration tests for key workflows. Flag exact gaps where the rule is not automatically verified or where failures do not block regressions.
---
For full implementation details, code examples, and framework-specific guidance,
see `references/rule.md`.
Rule page: https://frontendchecklist.io/rules/testing/integration-testing
Community Reviews & Field Notes
Tried this skill on your own project? Share the model you used and the results you got.