摘要
提出一种基于分支概率引导的回归测试案例生成方法。首先,通过对程序建模生成程序控制依赖图并计算分支概率,分支概率是指对某分支取反后所生成的测试案例能够覆盖程序修改部分的概率;然后,根据分支概率引导符号执行来生成能够覆盖程序修改部分的测试案例,符号执行每次选择分支概率最大的分支取反来生成测试案例,并迭代生成测试案例使之逐渐逼近符合期望的测试案例。对2个程序的20个演化版本进行测试案例生成,在相同实验环境下与已有的两种回归测试案例生成方法即eXpress和传统DSE进行比较。实验结果显示:相对原有方法本方法减少了45.6%和61.1%的搜索次数。
A novel method was proposed to generate regression test cases guided by the branch possibility(GBP).The symbolic execution was applied to search the paths of the program and generate control dependence graph of the program.The branch possibility was proposed to measure the possibility of that the new test case can cover the target code,which is generated by reserving the branch.The branch possibility of each branch in the test case was calculated to find the highest one which will be reserved to generate a new case,until the target code was run in the test case.20 versions of two programs were selected to compare our method with two existing algorithms such as eXpress and dynamic symbolic execution.The results show that the GBP can generate the test case effectively,and the search time is 45.6% and 61.1% lower than that of eXpress and dynamic symbolic execution(DSE).
出处
《中南大学学报(自然科学版)》
EI
CAS
CSCD
北大核心
2013年第S2期317-322,共6页
Journal of Central South University:Science and Technology
基金
国家自然科学基金资助项目(91118005
91218301
61221063
61203174)
国家科技支撑计划资助项目(2011BAK08B02)
教育部博士点基金资助项目(20110201120010)
中央高校基本科研业务费专项资金资助项目
关键词
回归测试
测试案例生成
分支概率
符号执行
控制依赖
regression test
test case generation
branch probability
symbolic execution
control dependency