影子模式:一种新的用于测试的设计模式  被引量:4

Shadow Pattern: A New Design Pattern for Testing

在线阅读下载全文

作  者:涂永忠[1] 邵晨曦[1] 蔡维德 胡香冬[1] 

机构地区:[1]中国科学技术大学计算机科学与技术系,合肥230027 [2]亚利桑那州立大学计算机科学系,滕比az85287

出  处:《计算机研究与发展》2004年第1期34-40,共7页Journal of Computer Research and Development

基  金:国家自然科学基金项目 ( 699740 3 8);国家高性能计算基金项目 ( 0 0 2 15 );安徽省 2 0 0 4年科技计划基金项目

摘  要:介绍了一种新的设计模式 :用于测试面向对象程序的影子模式 它为每个使用它的对象生成一个影子对象 这种模式允许测试脚本无缝地嵌入到程序中 ,无需额外的测试驱动或测试插件 在测试过程中 ,测试用例可以调用影子对象作为测试插件 ,也可以调用真实的应用代码 ,测试脚本可以在运行时做出选择Introduced in this paper is a new design pattern: a shadow for testing object-oriented programs. This pattern creates a shadow object for each object using it. By using this pattern, no additional test driver or test stub is needed. Thus, the pattern allows test scripts to be embedded in the program seamlessly. During testing, the test case can either call the shadow object as test stub or call the actual application code. The test script can make its decision at runtime to select which one to use. These ideas are illustrated in module testing and integration testing.

关 键 词:影子模式 设计模式 面向对象测试 

分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象