Testing & QA

Stub

/stʌb/

Definition

A simplified replacement for a real object that returns predefined responses — simpler than a mock, no verification.

Example in context

"The user repository stub returns a fixed user object — we just want the service to get a user, not test the repository."

Related terms

Practice this term

Master Stub 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.