Skip to content

Definition

A stub is a test double that returns canned answers to calls made during a test, standing in for a dependency the test does not want to exercise; outside testing, a stub is a short placeholder awaiting expansion.