These patterns examine how software can expose useful control and observation points for dependable tests.
Test Double substitutes a collaborator for a specific test so the real subject can encounter controlled responses or expose relevant interactions. Focused tests complement verification of the real dependency and production wiring.
Test Data Builder creates real test inputs from reusable defaults while each test states the values that distinguish its scenario, with explicit ownership of mutable data.
Consumer-Driven Contract Tests ground interface expectations in actual consumer execution and verify the same agreement against candidate providers before independent releases.
Humble Object — Move decision-making out of a hard-to-test boundary and leave a small adapter that translates inputs, delegates behavior, and applies results.
Golden Master / Approval Testing — Compare a reproducible observed result with an explicitly reviewed baseline, and require deliberate review when the result changes.
Parameterized Test — Run one test structure against named sets of inputs and independently specified expectations, preserving useful failure reporting for every case.