Chapter 6 – Test Tools
Stub – ISTQB Definition
Last Updated: July 12, 2026 · SoftwareTestPilot QA Team
Official ISTQB Definition
A skeletal or special-purpose implementation of a software component, used to develop or test a component that calls or is otherwise dependent on it.
In simple words
Fake code you drop in for a not-yet-built dependency so your module can be tested.
Exam tip
Stub returns hard-coded values; mock also verifies how it was called.
Related terms
- DriverFake caller code that invokes the module under test when the real caller doesn't exist yet.
- Mock ObjectA fake dependency you configure to expect specific calls and assert on them afterwards.
- Test HarnessThe scaffolding around the code under test — the drivers that call it and the stubs that fake its dependencies.
Practice this term in the ISTQB Mock Test
40 CTFL v4.0 questions, 60-minute timer, instant scoring and chapter-wise breakdown.
Practice in Mock Test