The difference between an emulator and a stub is that a stub also provides the means for a tester to view and interpret the data sent to it. A stub is a superset of an emulator.
这里的stub中文怎么翻译啊?
A Test Stub is an object that is used by a test to replace a real component on which the SUT depends so that the test can control the indirect inputs of the SUT. This allows the test to force the SUT down paths it might not otherwise exercise. A more capable version of a Test Stub, the Recording Test Stub can be used to verify the indirect outputs of the SUT by giving the test a way to inspect them after exercising the SUT.