摘要
类间集成测试是面向对象软件测试的重要组成部分,合适的测试顺序能够极大地节省测试成本.类间依赖关系构成环路的情况下,需要删除某些依赖关系以消除环路,同时需要引进测试桩.忽略类间动态依赖关系导致测试桩的数目不足,难以完成测试.文中提出一种基于动态依赖关系的类集成测试方法.首先分析了类之间的静态依赖和动态依赖关系;然后在保证测试桩的数目尽可能少的前提下,给出了边的删除规则以及消除由静态依赖关系和动态依赖关系形成的环路的算法,在此基础上,进一步提出测试顺序分配策略和算法;最后针对提出的方法开发了基于测试级的类测试序列自动生成工具——TLOG.实验结果表明:该方法较其它方法需要较少的测试桩,测试效率有明显提高.
Class integration testing is an important part in object-oriented software testing. An appropriate test order for software testing can reduce test cost. In the presence of cyclic dependency calls, the test order problem can be solved by removing relationships to break cycles and then create test stubs. There are insufficient test stubs to complete testing if ignoring dynamic dependency relations. In this paper, an approach for class integration testing based on dynamic dependency is proposed. First, inter-class static and dynamic dependencies are analyzed. Then, under the premise of minimizing the number of test stubs, rules of edge deletion are given, in addition, an algorithm of eliminating the cycles that formed by static and dynamic dependency is presented. Furthermore, an integration testing order strategy and an algorithm are given. Finally, the whole approach is implemented in a test levels order generator TLOG. The experiment results show that the method requires less test stubs than others and improves the test efficiency obviously.
出处
《计算机学报》
EI
CSCD
北大核心
2011年第6期1075-1089,共15页
Chinese Journal of Computers
基金
国家自然科学基金(60970032)
教育部科学技术研究重点项目(108063)
江苏省自然科学基金(BK2008124)
江苏省"青蓝工程"
江苏省研究生培养创新工程项目(CX10B_157Z)资助
关键词
集成测试
测试顺序
测试桩
动态依赖
测试级
integration testing
test order
test stubs
dynamic dependency
test levels