Stubs VS Drivers
Drivers
1.’Driver’ is a piece of software that drives (invokes) the Unit being tested. I.e. A piece of code that passes test cases to another piece of code
2. A driver creates necessary ‘Inputs’ required for the Unit and then invokes the Unit
3. Driver is called component
4. Used in the Bottom –Up Test strategy
Stubs
1. Stub’ is a piece of software that works similar to a unit which is referenced by the Unit being tested, but it is much simpler that the actual unit
i.e. a piece of code that simulates the activity of missing components
2. A Stub works as a ‘Stand-in’ for the subordinate unit and provides the minimum required behavior for that unit
3. Stubs is calling Component
4. Used in the Top – Down Testing Strategy