一种基于扩展类控制流图的类测试技术
Class Testing Based on Extended Class Control Flow Graph
-
摘要: 面向对象程序中的类是测试的基本单元, 采用数据流测试技术, 改进了原有生成类的调用控制流图算法, 生成扩展的类控制流图(ECCFG), 实现了对于类中方法内、方法间、类内部以及类间定义——使用对的分析, 有效地解决了由于面向对象程序的继承性, 导致的此前研究中对于单一类测试的覆盖率不足的问题.Abstract: Class is the basic unit to object-oriented program testing. On the basis of data-flow testing, an expended class control flow graph(ECCFG) was introduced in this paper, it improved class control flow graph algorithm to analysis the def-use pairs in intra-method, inter-method, intra-class and inter-class, which effectively solved the problem of inadequate coverage caused by focusing on single class testing and ignoring the inheritance of object-oriented program.