文章目录
Stub
- Stub
- Driver
- Stub与Driver
Stub译为桩,Driver译为驱动,在我看来,可以不管翻译直接去使用这两个英文单词,只因为翻译过来实在差点意思。
Stub is used to simulate the calling modules in tested module working process. Generally they only process few data.
Stub位于被测模块的下层,用于模拟测试模块工作过程中的调用模块。通常它们只处理很少的数据。
Driver module is used to simulate superior module of tested module. It receives testing data, transmits related to tested module, starts tested module and prints corresponding results.
测试桩向处于测试的模块发送数据,充当接口模块(替换低级模块),适用于自顶向下的测试。
DriverDriver位于被测模块的上层,用于模拟被测模块的上级模块。接收测试数据,传送测试模块相关信息,启动测试模块,打印测试结果。
测试驱动可以代替实际软件(高层软件),对底层模块进行更