# Stub and Fake

*noun*

say it: **“STUB and FAYK”** **/stʌb ænd feɪk/**

Test stand-ins: a stub returns fixed answers, and a fake is a simple working version, such as an in-memory list.

## What is **Stub and Fake**?

A **stub** returns canned answers; a **fake** is a working lightweight version, like an in-memory repository.

## In a sentence

- “We used a **stub** clock that always says 9 a.m., and a fake repository that keeps products in a list.”

Level: Journeyman · [More Unit Testing terms at this level](https://www.ask-codey.com/glossary?category=unit-testing&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/stub-and-fake
