|国家预印本平台
首页|基于遗传算法和程序依赖性分析的测试数据生成方法

基于遗传算法和程序依赖性分析的测试数据生成方法

test data generation approach using genetic algorithm and program dependence analysis

中文摘要英文摘要

基于分支覆盖的软件测试方法可有效的发现软件中的缺陷。为了确保分支覆盖能更加简约和精确有效,本文提出一种新的基于分支覆盖的测试数据生成方法。该方法主要分为两部分,首先,运用控制依赖分析对需覆盖的分支集进行约减,使得覆盖约减后的分支子集就可保证程序中所有的分支被覆盖;然后,对未覆盖分支进行依赖性分析,获得能到达该分支的路径约束;最后将多路径约束转化为合适的适应值函数,并采用遗传算法生成测试用例。经过分析可知本文方法可有效减少测试需求数目及改进适应值函数。

he software testing based on branch coverage is effective to detect defects in the program. For making the branch coverage more simple and precise, a novel approach to generating test data for branch coverage is presented. This approach consists two parts, first, utilizing control dependence analysis to reduce the number of testing requirements, and the coverage of the remaining branches can guarantee the coverage of all test requirements is achieved; second, the path constraints of the target branch is obtained by using program dependence analysis on it; and then transforming the path constraints to appropriate fitness function for the target branch, and the genetic algorithm is used to generate multiple test data. By analyzing the proposed approach, it could be known that it can greatly reduce the number of testing requirements and improve the fitness function.

靳蓉、姜淑娟、张红昌

计算技术、计算机技术

软件测试遗传算法程序依赖性分析测试数据生成分支覆盖

software testinggenetic algorithmlprogram dependence analysistest data generationbranch coverage

靳蓉,姜淑娟,张红昌.基于遗传算法和程序依赖性分析的测试数据生成方法[EB/OL].(2012-01-10)[2025-08-23].http://www.paper.edu.cn/releasepaper/content/201201-313.点此复制

评论