Stubs is when Top-down combination testing are used to imitate the character of the lower-level modules that aren't combined. Stubs are the modules that react as a short-term replacement for a called module and give the same output as the actual result.
ALSO, Stubs is used when the software needs to interact with an external system. The Stub can be used to replace the fully developed component used for testing causes. We can also use Stub during testing to separate system modules and troubleshoot complications. A test stub can also be referred to as a test double.