liveBook · Manning

Integration test

As explained in Build High Value Software Systems

A test that verifies interactions among software components or between software and an external system.

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

How Build High Value Software Systems covers it

How deep it goes
Defines the test layer, compares its risks and feedback time with other layers, and describes staging-data practice without providing test code.
Examples
Uses authentication, database queries, and a notification-preferences migration to show where integration checks can catch boundary failures.
What you can do after
Practice/perform it by assigning boundary risks to integration checks and running them against production-like staging data.
How it connects
Connects unit tests and end-to-end tests with API contracts, authentication flows, database persistence, and staging environments.

Also explained in

Compare how 40 books explain integration test →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build High Value Software Systems. The section links point to the parts of the book it draws on.