Jump to content

Test stub: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Addition
Tag: categories removed
Move general info to test double
 
(22 intermediate revisions by 17 users not shown)
Line 1: Line 1:
{{More citations needed|date=February 2021}}
In computer science, '''test stubs''' are programs that connect to online databases.
A '''test stub''' is a [[test double]] that provides static values to the software under test.


A test stub provides [[Canned_response|canned answers]] to calls made during the test, usually not responding at all to anything outside what's programmed in for the test.<ref>Fowler, Martin (2007), ''Mocks Aren't Stubs'' [http://martinfowler.com/articles/mocksArentStubs.html#TheDifferenceBetweenMocksAndStubs (Online)]</ref>
Test stubs are mainly used in High end node development. Stubs are computer programs that act as temporary replacement for a called module and give the same output as the actual product or software.


A stub may be [[source code|coded]] by hand or generated via a [[software tool|tool]].
==Example==

Nothing a computer program that queries a database to remove so it access the temperamental databases to remove and add
==See also==
Several testing frameworks are available, as is software that generates '''test stubs''' based on existing source code and testing requirements
* [[Mock object]]
* [[Method stub]]
* [[Software testing]]
* [[Test Double]]
* [[Stub (distributed computing)]]

==References==
{{reflist}}

==External links==
*[http://xunitpatterns.com/Test%20Stub.html Test Stub at XUnitPatterns.com]


[[Category:Software testing]]


{{compu-prog-stub}}

Latest revision as of 11:56, 4 May 2024

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 or generated via a tool.

See also

[edit]

References

[edit]
  1. ^ Fowler, Martin (2007), Mocks Aren't Stubs (Online)
[edit]