检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:林亚娜 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[自动化与计算机技术—计算机系统结构]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.87