What is the difference between stubs and drivers in software testing?

Viral Patel
2 min readMay 16, 2021

--

Stubs and drivers are the two concepts are used when some of the required components or functions are still in development and not available for Testing.

Let’s consider, you have two features, Feature A and Feature B, which are dependant on each other.

Now you need to test Feature A, Which takes some of the data from Feature B, and Feature B is still in development so you need to create a Dummy Feature B which produces data or input to test Feature A. and you can proceed to test with Feature A.

Now this Dummy Feature B called Stubs

Now you need to test Feature B, Which takes some of the data from Feature A, and Feature A is still in development so you need to create a Dummy Feature A which produces data or input to test Feature B. and you can proceed to test with Feature B.

Now this Dummy Feature A called Driver

So Basically Stubs and Driver are used for the same purpose replacing the module which is not developed yet or in development and not available for testing.

Stubs and Drivers are helpful to reduce unnecessary delays in testing and make testing faster.

Originally published at https://www.testerin.me on May 16, 2021.

--

--

Viral Patel
Viral Patel

Written by Viral Patel

Co Founder at QAble.io #Automation Tester,#Selenium Developing a New Automation tools: Connect Me for more details about it

No responses yet