Skip to main content
to stub out

to stub out

7.4
To replace a function in a program with a simple fake version for testing
  • phrasal verb
  • Specialized
translation icon : simular
  • During testing, developers stubbed out the payment API to simulate successful transactions without contacting the bank.

Examples

  • To isolate the module, she stubbed out several helper functions that relied on the network.

  • They are stubbing out the email service during unit tests to avoid sending real messages.

  • You can stub the method out for testing.

  • Don't forget to stub out the API calls!

  • During testing, developers stubbed out the payment API to simulate successful transactions without contacting the bank.

  • To isolate the module, she stubbed out several helper functions that relied on the network.

  • They are stubbing out the email service during unit tests to avoid sending real messages.

Synonyms

to mock
vsto stub out
  • Specialized
3 4.9

Replace a real part with a simple stand-in during tests

replaces it with a simple temporary implementation rather than full simulation

How Complete

to implement
515 3.7
mock
  • Specialized
20 7.0
to stub out
  • Specialized
7.4
placeholder
  • Specialized
1 7.0

Surface Forms

stub out infinitive
stubbed out past participle
stubbing out present participle
stubs out third person singular

Morphology

stub + out

The software sense of 'stub out' (to replace or provide a temporary placeholder implementation) is a specialized technical meaning that cannot be inferred from the literal verb 'stub' (to extinguish a cigarette) plus 'out'. The MWE derives from programming jargon (noun 'stub' = placeholder) and is not a transparent compositional extension of the given constituent senses, so a B1 learner knowing the literal words would not predict this meaning.

Etymology

Stub out in programming comes from making a short, simple piece of code called a stub that stands in for the real function while you test. So, to stub out something in code means 'to replace it temporarily with a simple fake'.