作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 体系结构与软件技术 • 上一篇    下一篇

基于混合测试和动态分析的分段代码测试

刘春宏,徐立华,颜 婷,杨宗源   

  1. (华东师范大学计算机科学技术系,上海200241)
  • 收稿日期:2014-03-12 出版日期:2015-02-15 发布日期:2015-02-13
  • 作者简介:刘春宏(1988 - ),女,硕士研究生,主研方向:软件测试;徐立华(通讯作者),副教授、博士;颜 婷,硕士研究生;杨宗源,教授、 博士生导师。
  • 基金资助:
    上海市自然科学基金资助项目(13ZR1413000)。

Segmented Code Testing Based on Concolic Testing and Dynamic Analysis

LIU Chunhong,XU Lihua,YAN Ting,YANG Zongyuan   

  1. (Department of Computer Science and Technology,East China Normal University,Shanghai 200241,China)
  • Received:2014-03-12 Online:2015-02-15 Published:2015-02-13

摘要: 传统混合执行测试方法无法对源代码不可见函数进行符号执行。针对该问题,将符号执行、分段式符号执行以及具体执行按需结合,提出一种分段式混合执行测试方法,将源代码不可见函数以分段式分析法截取为单独代码片段,结合动态执行和回归分析方法推导其相应的程序语义。为验证该方法的有效性,实现sCREST 原型系统,并对5 个应用广泛的开源系统进行测试。实验结果表明,该方法能够产生比传统方法覆盖更多分支数的测试数据。

关键词: 软件测试, 混合测试, 分段式符号分析, 动态分析, 测试数据生成, 分支覆盖

Abstract: Function calls with unavailable source codes can not be appropriately handled by symbolic execution in traditional concolic testing. To solve this problem, this paper proposes a segmented concolic testing method, which weaves,by demand,symbolic execution,segmented symbolic execution and concrete execution throughout the testing process. These function calls are treated as separate code segments,dynamically executed and analyzed to derive their corresponding program semantics. To demonstrate the effectiveness of the proposed method, this paper implements sCREST,a segmented concolic testing system based on CREST, and experiments with five open source systems. Experimental results show that segmente concolic testing is able to generate test data that covers more branches than that of the traditional approaches.

Key words: software testing, concolic testing, segmented symbolic analysis, dynamic analysis, test data generation, branch coverage

中图分类号: