Test Fixture
The prepared data or state a test runs against.
A test fixture is the prepared input a test needs: a sample record, a rendered document, a seeded database, a drawn image. Fixtures are where a surprising number of tests go quietly wrong, because a fixture chosen for convenience can make an assertion meaningless.
The failure has a general shape: the fixture already satisfies the property being asserted, for reasons unrelated to the code. A layout test using an image wider than its container passes whether or not the layout code works, because a shrink-to-fit box and a spanning box produce the same width in that case. Drawing a deliberately narrow fixture makes the two outcomes different, and the assertion real. A scroll test in a container with no height constraint passes vacuously. See Vacuous Truth.
Two further notes. Fixtures should be local and deterministic where the assertion is about behaviour — a remote image introduces network variance and decode noise into what should be a pure comparison. And a helper that merges overrides into a base fixture must merge before pruning explicitly-absent keys, or every attempt to blank a field silently keeps the base value and every negative-path test becomes a happy path.
See also6
Hand-picked in the note itself — the neighbours worth reading next.
Test Double
A stand-in for a real dependency during a test — and the ways a stand-in can lie.
Testing & Verification10 connections
Determinism
The property that identical inputs produce identical outputs, and the foundation of caching and verification.
Systems & Tooling27 connections
Seed Data
Initial content created programmatically to make an empty system usable or demonstrable.
Data & Content6 connections
Visual Regression Testing
Comparing rendered output against a stored baseline to catch unintended visual change.
Testing & Verification10 connections
Record and Replay Testing
Capturing a real interaction once and replaying it deterministically in later test runs.
Agents & Language Models12 connections
Integration Test
A test exercising several components together, through real interfaces rather than doubles.
Testing & Verification9 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from9
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.
- Integration TestTesting & Verification
A test exercising several components together, through real interfaces rather than doubles.
- Record and Replay TestingAgents & Language Models
Capturing a real interaction once and replaying it deterministically in later test runs.
- Responsive BreakpointDesign & Interface
A viewport width at which a layout changes, and the assumptions that come with it.
- Seed DataData & Content
Initial content created programmatically to make an empty system usable or demonstrable.
- Test DoubleTesting & Verification
A stand-in for a real dependency during a test — and the ways a stand-in can lie.
- 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.