Test driver (software)

In software testing a test driver is a software component or application that initiates and controls the execution of a program under test, especially when such components are part of a larger system and cannot run in isolation.[1] Drivers control applications across various stages of software testing, from unit[2] and integration testing right through to system integration testing and acceptance testing[3] , especially when the target module is a component of a larger system that is not yet fully implemented or otherwise unavailable.

Definition

edit

A test driver is a software component or tool developed to initiate and oversee the execution of a component under test, particularly when the component is part of a larger system and the system is yet to be fully implemented. Essentially, the test driver mimics the components of a system that interact with the component under test, feeding it the necessary input and controlling its execution. The primary goal of using a test driver is to verify the functionality of the isolated component in the absence of its intended complete environment.

Purpose

edit

Test drivers are tailored to meet the unique requirements of different testing environments. With manual test drivers, testers can directly initiate actions, offering them direct control throughout the testing phase. In comparison, automated test drivers—typically in the form of tools or scripts—can carry out tests on their own. These are especially useful in situations that demand repetitive or extensive testing.

Comparison with test stubs

edit

Test drivers and test stubs are both instrumental in software testing, but they serve distinct roles within a test harness.

Test drivers are typically an active component and control or call the system under test without further inputs after they are initialised, stubs on the other hand are usually passive components that only receive data and respond to calls from the tested system when needed.

References

edit
  1. ^ "driver". ISTQB Glossary. Retrieved 2023-09-10.
  2. ^ Myers, Glenford J.; Sandler, Corey; Badgett, Tom (2011). The Art of Software Testing, 3rd Edition. John Wiley & Sons. p. 205. Online Version.
  3. ^ Voas, Jeffrey; Miller, Keith (1998). Testing Component-Based Software. Computer. p. 3. Online Version.