Skip to content
Latchkey

Test Double - CI/CD Glossary Definition

A test double is any stand-in object used in place of a real dependency during testing. Mocks, stubs, fakes, spies, and dummies are the five canonical kinds.

The five kinds

A dummy fills a parameter and is never used; a stub returns canned answers; a spy records how it was called; a mock asserts on expected calls; a fake is a lightweight working implementation (like an in-memory database).

Why use them

Test doubles isolate the code under test from slow, nondeterministic, or external systems, making unit tests fast and repeatable in CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →