asked 186k views
0 votes
In the context of Integration Testing, a component the Tested Unit depends on and is a partial implementation that returns fake values is called:

A.) Driver

B.) Stub

C.) Test Class

D.) Test Fixture

1 Answer

2 votes

Final answer:

In Integration Testing, a partial implementation that returns fake values to simulate the behavior of a real component is known as a Stub. It is used when real components are not available for testing. Other test terms like Driver, Test Class, and Test Fixture serve different roles.

Step-by-step explanation:

In the context of Integration Testing, the correct term for a component that a Tested Unit depends on, which is a partial implementation and returns fake values, is called a Stub. A stub is used to simulate the behavior of real components that the unit under test interacts with. This method is often used when the real components are not yet developed or are unavailable for testing. Stubs provide pre-defined responses to the calls made by the tested unit.

Other options in the question such as Driver, Test Class, and Test Fixture, have different roles in the testing process. A Driver simulates a higher-level module and is used to test lower-level modules, while a Test Class is a class that contains test methods. A Test Fixture refers to the fixed state used as a baseline for running tests. Essentially, stubs and drivers are both part of the category known as test doubles - objects that stand in for real objects for testing purposes.

answered
User Sathya Baman
by
8.7k points