Day 12 of 60 · Unit, integration, contract

Integration testing

Bugs hide at the seams, the queue you forgot to drain, the timezone the third-party API doesn't share. Integration tests find them while CI is still warm.

ProblemBugs at the seams between modules, DB calls, queues, third-party APIs.

How it works

Tests that exercise multiple modules through a real or near-real environment. Test the contract, not the internals. Often the highest defect-yield layer per maintenance hour.

What it catches

Boundary defects, wrong query, missing transaction, schema mismatch, retry loops, timeouts. Catches 30–50% of bugs that unit tests miss.

Tools

Testcontainers · OSS pytest + Docker Compose · OSS WireMock · OSS

Verdict by project size

Small
Rec
Medium
Must
Large
Must
Extra-large
Must

Cost

Project size Setup Maint / mo Tool / mo CI / run
Small <10k LOC 1d 2h $0 +2m
Medium 10–100k LOC 3d 15h $0 +5m
Large 100k–1M LOC 10d 60h $0 +15m
Extra-large >1M LOC 30d 200h $0 +40m
Setup = engineer-days to first useful run · Maint = engineer-hours / month at steady state · Tool = out-of-pocket $ / month · CI = minutes added (or saved) per pipeline run

Lifecycle & ownership

When in lifecycle
Code Test
Per pull request · Runs in CI on every PR; gates merge.
Who owns it
Developer
Authoring + the inner loop
Collaborates with: QA / Test Engineer

Reference implementations

Quick check

Integration tests are highest-yield where?

One question. Pick the best answer. Your streak is saved locally on this device.

Save the lesson

Download SVG ↓

Screenshot for a 1:1, drop it in Slack, or download the SVG.

thinkbridge THE VALIDATION ATLAS DAY 12 OF 60 UNIT, INTEGRATION, CONTRACT Integrationtesting Bugs hide at the seams, the queue you forgot to drain, thetimezone the third-party API doesn't share. Integrationtests find them while CI is still warm. FIVE-MINUTE LESSON · ONE QUICK-CHECK QUESTION There’s a new way there
All 60 days →