Introduction
Testing how multiple modules/components interact (service + repository + DB/API).
- Ensure components integrate correctly.
- Catch errors missed in unit tests.
Test Business Flow correct or not
- How components work together
- Service → Repository → DB
- End-to-end behavior of a use case
Characteristics
- Scope: multiple real classes/modules.
- Test wiring, see got wiring issue or not.
- Slower than unit tests → seconds.
- Environment-dependent → real DB, API, message queues.
- Rollback / cleanup to avoid DB pollution.
- Closer to production behavior.
Flow
HTTP Request
↓
Controller (REAL)
↓
Service (REAL)
↓
Repo (REAL)
↓
DB (REAL)