📜  测试驱动程序

📅  最后修改于: 2020-12-04 06:45:36             🧑  作者: Mango


什么是测试驱动程序?

自下而上的集成测试期间使用了测试驱动程序,以模拟尚未集成的上层模块的行为。测试驱动程序是充当调用模块的临时替换并提供与实际产品相同的输出的模块。

当软件需要与外部系统进行交互并且通常比桩模块复杂时,也会使用驱动程序。

驱动程序-流程图:

驱动程序在自下而上的集成测试中的作用

上图清楚地表明,模块4、5、6和7无法集成,而以上模块仍在开发中,目前无法集成。因此,驱动程序用于测试模块。集成的顺序为:

4,2
5,2
6,3
7,3
2,1
3,1

测试方法:

+ Firstly, the integration between the modules 4,5,6 and 7
+ Test the integration between the module 4 and 5 with Driver 2
+ Test the integration between the module 6 and 7 with Driver 3