Home > Integration, Testing > Drivers Vs Stubs

Drivers Vs Stubs

Sl.No

Drivers

Stubs

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

‘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 driver creates necessary ‘Inputs’ required for the Unit and then invokes the Unit

A Stub works as a ‘Stand-in’ for the subordinate unit and provides the minimum required behavior for that unit

3

Driver is called component

Stubs is calling Component

4.

Used in the Bottom –Up Test strategy

Used in the Top – Down Testing Strategy

Advertisements
  1. kalpit kadia
    April 13, 2011 at 7:01 pm

    Thanks a lot
    Your comment helped me a lot in understanding this topic

  2. June 9, 2011 at 6:57 am

    Thanks for your right information……

  3. Ihsam
    November 16, 2011 at 9:49 pm

    thanks alot its more helpful

  4. December 4, 2011 at 7:55 am

    thanks !! really helpful !!

  5. Kingslin
    December 11, 2011 at 4:22 am

    Thanks a lot…

  6. Chetan Giridhar
    April 25, 2012 at 12:28 pm

    well put..

  7. Ankush Gupta
    June 9, 2012 at 2:14 pm

    well written…..thanks

  8. prathap
    October 26, 2012 at 9:57 am

    hi, how driver will pass input to another piece of code.. it would be great if you explain elaborately.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: