Test stubs

Test stubs

In computer science, test stubs are programs which simulate the behaviors of software components (or modules) that are the dependent modules of the module being tested.

Example

Consider a software program which queries a database to obtain the sum price total of all products stored in the database. However, the query is slow and consumes a large number of system resources. This reduces the number of test runs per day. Secondly, the tests need to be conducted on values larger than what is currently in the database.

The method (or call) used to perform this is "get_total()". For testing purposes, the source code in "get_total()" could be temporarily replaced with a simple statement which returned a specific value. This would be a test stub.

There are several testing frameworks available and there is software which can generate test stubs based on existing source code and testing requirements.

ee also

* Software testing

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Test Drive: Eve of Destruction — Developer(s) Monster Games Publisher(s) …   Wikipedia

  • Heterophile antibody test — The test is sensitive for heterophile antibodies produced by the human immune system in response to EBV infection. The monospot test, a form of the heterophile antibody test,[1] is a rapid test for infectious mononucleosis due to Epstein–Barr… …   Wikipedia

  • Bronchial challenge test — Diagnostics OPS 301 code 1 714 A bronchial challenge test is a medical test used to assist in the diagnosis of asthma.[1] The patient breathes in …   Wikipedia

  • College Scholastic Ability Test — Hangul 대학수학능력시험 Hanja 大學修學能力試驗 Revised Romanization …   Wikipedia

  • Open Field (animal test) — The Open Field Test (OFT) is an experiment used to assay general locomotor activity levels and anxiety in rodents in scientific research.[1] Experimental Design A Circular Open Field Developed by Calvin S. Hall to test emotionality of rodents …   Wikipedia

  • Neuropsychological test — Diagnostics MeSH D009483 …   Wikipedia

  • McMurray test — The McMurray test, also known as the McMurray circumduction test is used to evaluate individuals for tears in the meniscus of the knee.[1] It is a rotation test for demonstrating torn cartilage of the knee. A tear in the meniscus may cause a… …   Wikipedia

  • Driving test — Road test redirects here. For road testing a vehicle, see Test track (disambiguation). This article is about driving tests. For test driving, where a prospective buyer drives a vehicle to test it, see test drive. For the details of the driving… …   Wikipedia

  • Nitrate test — For the test to determine the ability of microbes to reduce nitrate to nitrite, see Nitrate reductase test. A nitrate test is a chemical test used to determine the presence of nitrate ion in solution. Testing for the presence of nitrate via wet… …   Wikipedia

  • Dexamethasone suppression test — Diagnostics Dexamethasone OPS 301 code 1 797 …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”