SOFTWARE TESTING
TEST PLAN AND TEST CASE DEVELOPMENT
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
stubs are otherwise called as original code.
|
True
|
|
false
|
|
Either A or B
|
|
None of the above
|
Explanation:
Detailed explanation-1: -No, mocks and stubs are not same. A typical stub is a database connection that enables you to simulate any scenario even in the absence of an actual database. A mock is a made-up class that can be investigated for its interactions with the actual class being tested after the test has been completed.
Detailed explanation-2: -Dummy: It is used as a placeholder when an argument needs to be filled in. Stub: It provides fake data to the SUT (System Under Test). Spy: It records information about how the class is being used. Mock: It defines an expectation of how it will be used.
There is 1 question to complete.