基于调用图的类间MM路径自动生成方法研究  

Call-Graph-Based Interclass MM Path Generation

在线阅读下载全文

作  者:何伟[1] 赵瑞莲[1] 朱群雄[1] 

机构地区:[1]北京化工大学计算机科学与技术系,北京100029

出  处:《计算机研究与发展》2013年第2期332-343,共12页Journal of Computer Research and Development

基  金:国家自然科学基金项目(61170082;61073035;60903002)

摘  要:在面向对象的软件测试中,类间集成测试尤其困难.方法/消息路径(MM路径)是由消息连接的方法执行序列,可以很好地体现面向对象软件由对象发送消息调用方法执行的交互过程,因此非常适于面向对象软件的集成测试.结合现有调用图构建算法,提出了一种基于调用图的面向对象软件类间MM路径自动生成方法,并通过大量实验,研究了采用类层次分析和安德森指向分析这2种典型调用图构建算法对生成MM路径的数量和时间花费的影响,进而分析了面向MM路径生成的测试用例集对被测程序的结构测试覆盖效果.实验结果表明:基于调用图的类间MM路径自动生成方法是确实可行的;采用安德森指向分析较类层次分析生成类间MM路径的数量平均增加13.11%,时间消耗却平均减少27.78%;此外,针对安德森指向分析生成的类间MM路径进行面向路径的测试用例自动生成,其生成的测试用例集对被测程序获得的结构覆盖率比采用类层次分析平均提高2%~7%.因此,对于基于调用图的面向对象软件类间集成测试路径生成,基于安德森指向分析较类层次分析生成类间MM路径的效率更高.Interclass integration testing of object-oriented software is particularly hard. Method/ message path (MM path) is defined as an interleaved sequence of method executions linked by messages. It presents well the interactions between the methods of object-oriented software, and hence fits for object-oriented integration testing. In this paper, a call-graph-based approach to generate interclass MM paths automatically is proposed. This approach is evaluated by two typical call graph construction algorithms, class hierarchy analysis and Anderson's points-to analysis, on twelve benchmark programs. The result shows that our approach is practicable, and based on Anderson's points-to analysis, 13. 11% more interclass MM paths can be generated with 27. 78% less time consumption than based on the class hierarchy analysis. Moreover, the structural coverage is increased by 2% and 7% with the MM-path-oriented test suites which are generated based on Anderson's points-to analysis than based on the class hierarchy analysis. Therefore, Anderson's points-to analysis outperforms the class hierarchy analysis for call-graph-based interclass MM path generation.

关 键 词:MM路径 调用图 类层次分析 安德森指向分析 面向对象软件的集成测试 面向路径的测试用例自动生成 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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