Never underestimate the power of Passion!

Saturday 16 May 2015

On 11:48 by Vardan Kumar in ,    No comments
Test Stub vs Test Drive

Difference between Test Stub and Test Drive

Before we begin with the differences let us discuss,what test stub and test drive actually is in software engineering.

As the name suggests test stub and test drives both are testing tools which differ in functionality from each other

Difference between Test stub and Test Drive
Test stub vs Test drive

Test Stub

These are the non-functional programs that imitates the regulation of a module in the source code of a software's self contained part.

For instance,let us say that we need to complete eight modules in a software but we are ready with just seven modules and we have got no time left,then test stub will simulate as if its the eight module in testing process.

Test Drive

These are the small codes that passes test control/intervention to another code.It usually provides a testing surroundings to a separate component of the source code. 

Suppose you have designed a game of chess and let us say a player has input to move Knight to  a certain square,then it would be test drivers to ensure whether the Knight is at expected square or not.

DIFFERENCE BETWEEN TEST STUB AND TEST DRIVE

TEST STUB
TEST DRIVE
1. Used in top down testing.
1. Used in bottom up testing
2. High level objects are created first.
2. Low level objects are created first.
3. Substitute for actual code.
3. Substitute for missing code.
4. Used when main module is complete and sub-module is still incomplete.
4. Used when Sub- module is complete and main module is still incomplete
5. Simulates low level modules.
5. Simulates high level modules.
6. A test tool that replaces a called component.
6.  Replaces an object that takes care 
of calling of a component
7. Used only to analyze outputs.
7. Often used to analyze inputs.
8. Emulate a called function.
8. Emulate a calling function.
9. Module that stands in for an unfinished portion of a system.
9. Module which is used to invoke a module under test.
10. Stubs can be filled in to form the actual method.
10. Drivers can become automated test cases..


THESE WERE THE DIFFERENCES BETWEEN 
TEST STUB AND TEST DRIVES.


0 comments:

Post a Comment