Thursday, July 26, 2012

Top Down & Bottom UP Testing



Top-Down Testing:
Top –Down Testing take place from Top to bottom In this testing Stubs used. “Stub” it’s special purpose software component . If sub module is not developed a temporary program called that is Stub. A stub is called from software component to be tested.

During Testing X  call the Stub A or Stub B.
1.       X calls Stub A  , If error occurs then will come to know that problem is in A or problem in interface between Component X and Stub A
2.       X calls Stub B  , If error occurs then will come to know that problem is in B or problem in interface between Component X and Stub B

Important Note: Remember that here we are testing the component X using Stubs A and B. Stubs are used to simulate the activity of the components that are not currently tested.



Bottom-Up Testing:
 Bottom-Up Testing take place from Bottom to Top.  If main module is not developed  a temporary program used  that is Driver. “Driver” its Software component which calls a component to be tested.


During testing Driver X calls Component A or Component B
1.       Driver X calls component  A, If error occurs then will come to know that problem is in  Driver X or problem in interface between  X and component  A
2.       Driver X calls component  B, If error occurs then will come to know that problem is in  Driver X or problem in interface between  X and component  B



Important Note:
Remember that here we are testing component B and C using Driver X


Example:
Cab Service :  Unit Testing of “Customer order Decline” Program , Here a driver will have code which will create customer order records using hardcoded data and then calls Customer order decline program. Program customer order decline uses another unit which Check how many customer raise the request for cab on same time, check that cab is available or not some complex thing. For checking and calculation call to this unit will be replaced by Stub.

2 comments:

  1. Thanks for providing us information that we really need for my SEO business. Good thing to know that there are people who care for other by sharing their insights about SEO.

    Multilingual websites

    ReplyDelete


  2. Videocon prepaid mobile recharge anytime, anywhere – Recharge online instantly and stay connected with your loved ones.
    online recharge

    ReplyDelete