高级检索
    何 伟 赵瑞莲 朱群雄. 基于调用图的类间MM路径自动生成方法研究[J]. 计算机研究与发展, 2013, 50(2): 332-343.
    引用本文: 何 伟 赵瑞莲 朱群雄. 基于调用图的类间MM路径自动生成方法研究[J]. 计算机研究与发展, 2013, 50(2): 332-343.
    He Wei, Zhao Ruilian, and Zhu Qunxiong. Call-Graph-Based Interclass MM Path Generation[J]. Journal of Computer Research and Development, 2013, 50(2): 332-343.
    Citation: He Wei, Zhao Ruilian, and Zhu Qunxiong. Call-Graph-Based Interclass MM Path Generation[J]. Journal of Computer Research and Development, 2013, 50(2): 332-343.

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

    Call-Graph-Based Interclass MM Path Generation

    • 摘要: 在面向对象的软件测试中,类间集成测试尤其困难.方法/消息路径(MM路径)是由消息连接的方法执行序列,可以很好地体现面向对象软件由对象发送消息调用方法执行的交互过程,因此非常适于面向对象软件的集成测试.结合现有调用图构建算法,提出了一种基于调用图的面向对象软件类间MM路径自动生成方法,并通过大量实验,研究了采用类层次分析和安德森指向分析这2种典型调用图构建算法对生成MM路径的数量和时间花费的影响,进而分析了面向MM路径生成的测试用例集对被测程序的结构测试覆盖效果.实验结果表明:基于调用图的类间MM路径自动生成方法是确实可行的;采用安德森指向分析较类层次分析生成类间MM路径的数量平均增加13.11%,时间消耗却平均减少27.78%;此外,针对安德森指向分析生成的类间MM路径进行面向路径的测试用例自动生成,其生成的测试用例集对被测程序获得的结构覆盖率比采用类层次分析平均提高2%~7%.因此,对于基于调用图的面向对象软件类间集成测试路径生成,基于安德森指向分析较类层次分析生成类间MM路径的效率更高.

       

      Abstract: 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.

       

    /

    返回文章
    返回