Testing & QA

Mock

/mɒk/

Definition

A fake object replacing a real dependency in tests, with configurable return values and call verification.

Example in context

"We mock the Stripe SDK in tests — no real payments, but we verify the correct method is called with the right arguments."

Related terms

Practice this term

Master Mock in context by working through exercises in the Testing & QA module. You'll see the term used in real engineering scenarios with multiple-choice, fill-in-the-blank, and matching drills.