Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

Difference between Stubs and Drivers

These are types of test harnesses, or are a collection of tests and software. Both of these are designed for testing a program’s unit. But there is a significant difference between stubs and drivers in the process of software testing. While we usually utilise stubs for top-down testing, we mainly use the drivers for bottom-up testing. These are the components used in the form of short-term alternatives to the modules. Let us look at more differences between stubs and drivers.

Difference between Stubs and Drivers

Let us talk about the differences between Stubs and Drivers. To make this topic more understandable and clear, we are comparing both of the terms based on their individual characteristics in a table.

Parameters Stubs Drivers
Basics It refers to the section of the code that performs the imitation of the called function. It refers to the section of the code that performs the imitation of the calling function.
Development These are developed during an incremental integration testing’s top-down approach. These are developed during an incremental integration testing’s bottom-up approach.
Significance It is used for the significance of the low-level modules. It is used for the significance of the high-level modules.
Function Stubs perform the replication of the activities of missing or not developed modules or various components. The drivers perform the authorisation of the test cases to a different system. It refers to the modules that are under testing.
Uses We use stubs for the testing of a module’s functionality. It is also used for testing the modules and then replicating the lower-level module’s performance that is not merged yet (along with the missing component/ module’s activity). We make use of the drivers when the main module is ready or prepared. The drivers, as compared to the stubs, are somewhat more complex.
Creators A team of test engineers performs the creation of stubs. Most of the time, the test engineers, along with the developer perform the creation of stubs.
Purpose of Development These are developed during the testing of the high-level modules when the formation of lower-level modules hasn’t occurred. These are developed during the testing of the low-level modules when the development of the higher-level module hasn’t occurred.
Integration It is used mainly for top-down testing of integration. It is used mainly for bottom-up testing of integration.
Testing for It is mainly reserved for the testing of the functionality and features of all the modules. It is used mainly when the software’s core module isn’t established yet for testing.

Keep learning and stay tuned to BYJU’S to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2024, GATE Admit Card, GATE Application Form, GATE Syllabus, GATE Cutoff, GATE Previous Year Question Paper, and more.

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*