Hardcoding embeds values or infrastructure assumptions directly in application or test code. In tests, shared helpers and fixed files hide inputs, create secret couplings, and make later changes brittle. section 11.4 section 12.2
Recognize hardcoding when:
- A test depends on a file whose origin and meaningful values are unclear. section 12.2
- An innocent update to shared data breaks many tests because their dependencies were never visible locally. section 11.4
Replace hidden fixtures with generated data
Instead of uploading a fixed CSV file, generate rows in the test, select the relevant subset, serialize the rows, and derive expected identifiers from that same data. This keeps inputs and assertions connected while allowing the test to scale from a few rows to millions.

