How is Bottom-Up approach and Top down approach related with Driver and Stub concept?

997    Asked by EstebanOsterberg in QA Testing , Asked on Nov 15, 2019

Let’s understand this with an example.

Let’s say we have 2 modules (Input module & Addition Module). Here we are given to test addition module. As we can see Addition module is dependent on Input module. Since Input module is not yet developed, we will replace this with some dummy code (This dummy code can either be called Driver or Stub). As

we can see from the image, we have to move from the bottom module to top module to validate Addition module. Now let’s see below image.

Here we observe that Input module is replaced with Driver, that means if we are using Bottom- Up approach, here the undeveloped module is replaced with Driver. However, if the scenario had been as below:

Here Input module is developed, and Addition module is not yet developed, we will follow top down approach as per the scenario and replace the Addition module with some dummy code and will call this dummy code as Stub.


Let’s say we have 2 modules (Input module & Addition Module). Here we are given to test addition module. As we can see Addition module is dependent on Input module. Since Input module is not yet developed, we will replace this with some dummy code (This dummy code can either be called Driver or Stub). As

we can see from the image, we have to move from bottom module to top module to validate Addition module. Now let’s see below image.


Here we observe that Input module is replaced with Driver, that means if we are using Bottom- Up approach, here the undeveloped module is replaced with Driver. However, if the scenario had been as below:


Here Input module is developed, and Addition module is not yet developed, we will follow top down approach as per the scenario and replace the Addition module with some dummy code and will call this dummy code as Stub.



Your Answer

Interviews

Parent Categories