An integration test checks whether software components collaborate correctly across a boundary. It is a useful first line of defense for database persistence, API contracts, and authentication flows: problems there can pass isolated checks yet cause failures later in delivery. section 5.3
Choose the testing layer by the risk it should contain. Unit tests check rules, calculations, and invariants quickly. Integration tests catch boundary failures, typically in seconds. End-to-end tests check a small set of critical user journeys, but are slower and more fragile. A large, slow integration suite can itself delay feedback and encourage larger batches of work. section 5.3
Catch a migration problem before run
A notification-preferences change encountered repeated staging failures. Running integration tests against production-like data volumes—including legacy preference schemas, high-volume users, and unusual character encodings—makes such failures more likely to surface in build/test rather than later. An automated pipeline can refresh anonymized staging data each week so those cases do not depend on someone remembering to add them. section 1.2.3 section 1.2.4
Table 5.1 Activity ratio analysis of a simple workflow
|
System area
|
Risk assessment
|
First line testing layer
|
What should it protect?
|
|
User login/Authentication
|
High impact, medium likelihood
|
Integration
|
Correct authentication outcome and session handling
|
|
Database retrieval/Queries
|
Medium impact, high likelihood
|
Integration
|
Correct boundary behavior and data mapping
|
|
Business calculations logic
|
High likelihood, high financial impact
|
Unit
|
Deterministic correctness of rules and edge cases
|
|
Critical
user journey (Login → Retrieve → Calculate)
|
High impact, low likelihood
|
Small, stable set of E2E
|
End-to-end customer-visible behavior
|
|
Logging/Formatting utilities
|
Low impact, high likelihood
|
Minimal, if any.
|
Core invariant only, avoid overtesting
|
Compare the risk and first testing layer for authentication, database queries, business calculations, and a critical user journey. The table places boundary behavior in integration tests without making them the default for every risk. section 5.3
The practical question is: which boundary failure would be costly if it reached staging or production, and what is the earliest check that can catch it? Protect those boundaries with focused integration checks; avoid growing the suite until its feedback becomes a bottleneck. section 5.3 section 1.2.4







































