基于改进遗传算法的测试用例进化生成方法研究  被引量:2

Research on test data evolution generation based on improved genetic algorithm

在线阅读下载全文

作  者:林亚娜 Lin Yana(Computing and Information Science College,Fuzhou Institute of Technology,Fuzhou,Fujian 350506,China)

机构地区:[1]福州理工学院,福建福州350506

出  处:《计算机时代》2022年第12期40-43,共4页Computer Era

基  金:2021年福州理工学院校级科研基金项目“基于遗传算法的测试用例进化生成研究FTKY21057”;2021年福州理工学院校级一流本科课程建设项目“线下一流课程软件测试技术”(LGJG2021058);2021年福州理工学院校级教学改革项目“软件测试技术课程建设与实践”(LGJG2021023)。

摘  要:软件测试中的路径覆盖法生成测试用例问题,可看作寻找最优路径问题。针对手工设计或随机算法生成测试用例效率不高及覆盖率难以保证等问题,提出一种改进的遗传算法。构建目标路径集合,通过改进适应度函数,拉大实际路径与目标路径差异从而提升算法的收敛速度,通过对目标路径的关联性判断找出不可达路径,缩小匹配范围,进一步提高生成效率。在基础程序中仿真应用,将本文方法与随机算法比较,结果表明,改进的遗传算法在复杂程序中能够提高路径覆盖率,减少冗余数据,提高测试数据生成效率。Path coverage in software testing is commonly used in finding optimal path.Manually or randomly generating test data is difficult to cover all paths,and it is not very efficient.An improved genetic algorithm is proposed,and the set of target paths is constructed.By improving the fitness function,the difference between the actual path and the target path is increased to improve the convergence speed of the algorithm.The unreachable path is identified by the correlation judgment of the target path to reduce the matching range and further improve the generation efficiency.The experimental results show that compared with the random method,the improved genetic algorithm can improve path coverage in complex programs,reduce redundant data,and improve efficiency of test data generation.

关 键 词:不可达路径 遗传算法 适应度函数 自动生成测试用例 

分 类 号:TP301.6[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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