Home Basic SDP Test Case Web Testing FAQ Others
You are here: Home>>Basic Concept>> Stubs and Drives

Introduction

Testing Types

Black Box Testing

GUI Test Checklist

you are here Stubs and Drives

Decision tables

Equivalence Class

Standards for software

Integration

Software Review

Usability Testing

Load / Stress Testing

QA Glossary


We need your help! To keep the site alive, please make the donation by clicking the button below.
Thank you very much!

How to Make a Donation Using PayPal Without an Account?

Stubs and Drives

Testing program and function work as designed

Stubs

* Pieces of programs, usually functions or procedures, that provide the correct interface but not the correct implementation of some other piece of program, typically a function or an abstract data structure.
* A stub makes it possible to test certain aspects of a high-level function or abstract data type without having implemented all of the lower-level functions or abstract data types that it uses. Stubs are necessary when top-down programming is used

Stubs

* Stubs are program units that are stand-ins for the other (more complex) program units that are directly referenced by the unit being tested
Stubs characteristics
* An interface that is identical to the interface that will be provided by the actual program unit
* The minimum acceptable behavior expected of the actual program unit. (This can be as simple as a return statement.)

Drives

* Traditionally, a drivers is a piece of software that controls (drives) the unit being tested. Drivers are usually thought of as invoking, or at least containing, the unit being tested, i.e., units (being tested) are subordinate to their respective drivers.

Drives

* Drivers are programs or tools that allow a tester to exercise/examine in a controlling manner the unit of software being tested.

Drives Characteristics

* a means of defining, declaring, or otherwise creating, any variables, constants, or other items needed in the testing of the unit, and a means of monitoring the states of these items,
* any input and output mechanisms needed in the testing of the unit,
* a means of controlling the unit being tested, e.g., deciding when the unit will be invoked, and what information will be supplied upon invocation,
* the generation and/or handling of any necessary interrupts,
* the generation and/or handling of any necessary exceptions.

Stubs and Drivers

Units usually tested in standalone mode
* Use drives for high-lever routines that call this unit
* Use stubs for Lower-lever routines that are called this unit
Stubs and Drivers