Test stub

From Wikipedia, the free encyclopedia
(Redirected from Test stubs)
Jump to navigation Jump to search

A test stub is a test double that provides static values to the software under test.

A test stub provides canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test.[1]

A stub may be coded by hand, generated via a tool or be created as a dedicated part of a larger system such as a stub server or service.

Stubs differ from mock objects, which assert and verify interactions. Stubs only supply data.[2][3]

See also

[edit | edit source]

References

[edit | edit source]
  1. ^ Fowler, Martin (2007), Mocks Aren't Stubs (Online)
  2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
[edit | edit source]