Stub
Meaning in software engineering, with examples
In software engineering, stub means: A simple test replacement for a real function, service, or module that returns preset data under controlled conditions.
In Turkish: test dublörü, stub
How it is used
Used in testing to isolate code from external systems and make results predictable. Often mentioned with fixed responses, dependencies, and unit tests.
Example sentences
In the unit test, we replaced the billing service with a stub that always returns the same invoice status for overdue accounts.
Here the term means a controlled stand-in that supplies known outputs so the test can focus on our code's behavior.
The backend team exposed a stub for the shipping API so the mobile app could be tested before the partner system went live.
In this sentence, it refers to a temporary substitute that imitates expected replies and removes the need for the real integration.
Common collocations
- test stub
- create a stub
- stub response
Related terms
More terms: Testing
Practise with graded reading
Reading at the right level is the fastest way to make new words stick. Pick free English books by level:
