0
4.4kviews
With the help of neat diagram, describe unit testing.
1 Answer
1
109views

Unit Testing : Software product is made up of many units, each unit needed to be tested to find whether they have implemented the design correctly or not.

Additional Requirements : The module under consideration might be getting inputs from anothermodule or the module is calling some another module . Some interfac e moduleshas to be simulated if required like drivers and stubs.

Drivers: The module where the required inputs for the module under test are simulated for the purpose of module or unit testing is known as a Driver module. The driver module may print or interpret the result produced by the module under test.

Stubs: The module under testing may also call some other module which is not ready at the time of testing. There is need of dummy modules required to simulate for testing, instead of actual modules. These are called stubs.

enter image description here

Unit testing procedure:

  • Unit testing is normally considered as an adjunct to the coding step. The design of unit test can be performed before coding begins or after source code has been generated. Guidance for establishing test cases for finding out undiscovered errors can be taken by the review of design information.

  • Each test case need to be associated with set of expected results with it. In many applications a driver is known as ―main program‖ that takes input from test case data, also passes that data to the component that need to be tested and prints concerned results.

  • Stubs are useful for replacing modules which are subordinate of the component that we are going to test. A dummy sub program or stub can make use of subordinate modules interface.

  • It generally does very less data manipulation, also provides verification of entry and used to return control to the module i.e. currently undergoing the testing.

Please log in to add an answer.