What are stubs and drivers used for in white-box testing?

Questions by timmy   answers by timmy

Showing Answers 1 - 2 of 2 Answers

Stubs and Drivers are the small programs used in the integration testing such that these programs are placed where the output of undeveloped modules. that is in some cases, some of the non priority module's output is needed in the project. then to get out of that situation, we write a small program such that it generates exactly similar output of the ungenerated module. these programs are called stubs and drivers.

Here stub is used when we are testing the application in top-down approach.
and driver is used when we are testing the application in bottom-top approach.

Thanks
Maruthi.
maruthi_a@yahoo.com

xyz

  • Apr 24th, 2007
 

A driver a software module used to invoke a module

under test and, often, provide test inputs, control and monitor execution, and report test

results



drivers in whitebox testing is like for example just calling a method.

  for ex. moveMouse(int x,int y);


This method will be called by main method.

A stub is a computer program statement substituting for the body of a software module

that is or will be defined elsewhere



For ex.
public void moveMouse(int x,int y) {mouse.setPosition(1);

}

developing the stub allows the programmer to call a method in the code being

developed, even if the method does not yet have the desired behavior

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions