Welcome To TestQSpider

It's Testing World.Lets Explore Your Life Here

Why We Use Stubs And Drivers?

Somdeb Burman | 4:39:00 AM | 1 comments

Stubs are dummy modules that are always distinguish as "called programs", or you can say that is handle in integration testing (top down approach), it used when sub programs are under construction.

Stubs are considered as the dummy modules that always simulate the low level modules.

Drivers are also considered as the form of dummy modules which are always distinguished as "calling programs", that is handled in bottom up integration testing, it is only used when main programs are under construction.

Driversare considered as the dummy modules that always simulate the high level modules.

Example of Stubsand Drivers is given below:-

For Example we have 3 modules login, home, and user module. Login module is ready and need to test it, but we call functions from home and user (which is not ready). To test at a selective module we write a short dummy piece of a code which simulates home and user, which will return values for Login, this piece of dummy code is always called Stubs and it is used in a top down integration.  

Considering the same Example above: If we have Home and User modules get ready and Login module is not ready, and we need to test Home and User modules Which return values from Login module, So to extract the values from Login module We write a Short Piece of Dummy code for login which returns value for home and user, So these pieces of code is always called Drivers and it is used in Bottom Up Integration

Conclusion:-
So it is fine from the above example that Stubs act "called" functions in top down integration. Drivers are "calling" Functions in bottom up integration.

Category: , ,

1 comment:

  1. i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.Top QA Companies
    Top Automation Testing Companies
    Top Mobile App Testing Companies
    Top Performance Testing Companies

    ReplyDelete