SOFTWARE ENGINEERING

SOFTWARE ENGINEERING TOOLS AND ENVIRONMENTS

AUTOMATED TESTING TOOLS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What are the modules that act as temporary replacement for a called module and give the same output as that of the actual product?KLO 2.2 c
A
a. Mock
B
b. Stubs
C
c. Fake
D
d. Test fixture
E
0
Explanation: 

Detailed explanation-1: -Stubs are the modules that act as temporary replacement for a called module and give the same output as that of the actual product. The replacement for the ‘called’ modules is known as ‘Stubs’ and is also used when the software needs to interact with an external system.

Detailed explanation-2: -A stub is a small piece of code that takes the place of another component during testing. The benefit of using a stub is that it returns consistent results, making the test easier to write. And you can run tests even if the other components are not working yet.

Detailed explanation-3: -While a Stub simulates real objects with the minimum methods needed for a test, Mock objects are used to check if the correct techniques and paths are applied to the objects. Additionally, Mock is very useful when we have an extensive test suite, and each test requires a unique data set.

Detailed explanation-4: -Stubs serve to replace modules that are subordinate (called by) the component to be tested. A stub or “dummy subprogram” uses the subordinate module’s interface, may do minimal data manipulation, prints verification of entry, and returns control to the module undergoing testing.

There is 1 question to complete.