Integration Test
A test exercising several components together, through real interfaces rather than doubles.
An integration test exercises multiple parts of a system together — usually through their real interfaces, with real data structures and sometimes a real database or browser. It trades speed and precision for the thing unit tests structurally cannot provide: evidence that the pieces actually fit.
The case for weighting toward integration is that most defects live between components rather than inside them. A pair of components can each be perfectly tested and disagree about whose responsibility something is, and no unit test can see the gap. It also gives more freedom to refactor: the test is bound to observable behaviour rather than internal structure.
The costs are real. Integration tests are slower, they fail for environmental reasons more often, and a failure points at a region rather than a line — so diagnosis takes longer.
The pragmatic position that most teams converge on: integration tests for anything crossing a boundary or depending on real environment behaviour, unit tests for pure logic with many cases, and as few end-to-end tests as will do — those being the slowest and most fragile of all, but the only ones that can prove the whole thing works.
See also5
Hand-picked in the note itself — the neighbours worth reading next.
Unit Test
A fast, isolated test of one unit of behaviour with its collaborators replaced.
Testing & Verification11 connections
Component Story
An isolated rendered instance of a component, usable as documentation, a workbench, and a test.
Testing & Verification15 connections
Headless Browser
A real browser driven programmatically without a visible window.
Testing & Verification10 connections
Test Fixture
The prepared data or state a test runs against.
Testing & Verification12 connections
Test-Driven Development
Writing a failing test first, making it pass, then improving the code with the test as a net.
Testing & Verification9 connections
Related4
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from8
Notes elsewhere in the wiki that reach for this one.
- Component StoryTesting & Verification
An isolated rendered instance of a component, usable as documentation, a workbench, and a test.
- Headless BrowserTesting & Verification
A real browser driven programmatically without a visible window.
- Responsive BreakpointDesign & Interface
A viewport width at which a layout changes, and the assumptions that come with it.
- Test DoubleTesting & Verification
A stand-in for a real dependency during a test — and the ways a stand-in can lie.
- Test FixtureTesting & Verification
The prepared data or state a test runs against.
- Test-Driven DevelopmentTesting & Verification
Writing a failing test first, making it pass, then improving the code with the test as a net.
- Unit TestTesting & Verification
A fast, isolated test of one unit of behaviour with its collaborators replaced.
- Visual Regression TestingTesting & Verification
Comparing rendered output against a stored baseline to catch unintended visual change.