当前位置:主页 > 科技论文 > 自动化论文 >

改进SFL-PS0算法的测试数据自动生成方法研究

发布时间:2018-05-18 03:04

  本文选题:测试数据自动生成 + SFL-PSO ; 参考:《山东科技大学》2017年硕士论文


【摘要】:软件测试是提高软件质量的一种非常重要的方法,自动化测试在提高软件测试效率方面发挥了关键作用,其中重要环节是测试数据的自动生成,旨在减轻人工生成测试数据的工作量,进而提高测试数据生成效率。与遗传算法、蚁群算法、模拟退化算法等测试数据生成算法相比,粒子群优化算法具有参数少、全局搜索能力强、收敛快的优点,但在进化中后期,由于种群多样性的减少,造成群体易出现局部最优,发生早熟、收敛慢等问题。SFL-PSO算法通过保持群体多样性可有效减少早熟现象的发生,但该算法所采用的分组思想使得各分组之间的差异很小,导致粒子群体的多样性较少,而且,对惯性权重w和三个学习因子的取值只限于某个常数,在处理早熟问题时算法效率较低。对现有SFL-PSO算法做出改进,以提高测试数据生成效率。第一,对现有分组方式做出改进,采用基于洗牌算法的分组策略,以增大各组内及组间的差异,达到增加种群多样性的目的。第二,根据适应度方差,对w进行动态调整,当满足“适应度方差设定阈值”时,采用调整因子增大w的取值,以增大粒子的寻优范围,使其摆脱局部最优,并通过实验确定了最佳阈值为0.1,此时算法的效率最高。第三,采用个体最优、组内全局最优、种群全局最优的适应度值在三个适应度值之和中所占的权重对学习因子C_1、C_2、C_3赋值,促进粒子对种群中最优粒子的学习,加快收敛,实验证明,采用该方案生成测试数据的效率要高于传统取值方案。此外,通过实验确定了当组内最大迭代次数取值为(5,11)之间的某个值时,算法性能较优。最后,通过实验验证改进算法的性能,选取多个典型的基准程序作为被测程序,分别采用PSO算法、SPSO算法、SFL-PSO算法、改进SFL-PSO算法为各目标路径生成测试数据,结果表明,改进SFL-PSO算法拥有最高的搜索成功率和最佳的稳定性,此外,就迭代次数和运行时间而言,相比SFL-PSO算法,改进算法的性能更优。
[Abstract]:Software testing is a very important method to improve software quality. Automated testing plays a key role in improving the efficiency of software testing. The purpose of this paper is to reduce the workload of generating test data by hand, and to improve the efficiency of test data generation. Compared with genetic algorithm, ant colony algorithm, simulation degradation algorithm and other test data generation algorithms, particle swarm optimization has the advantages of fewer parameters, stronger global search ability and faster convergence, but in the middle and late stages of evolution, because of the decrease of population diversity, SFL-PSO algorithm can effectively reduce the occurrence of precocious phenomenon by maintaining population diversity, but the group idea adopted by the algorithm makes the difference between different groups very small. As a result, the diversity of particle population is less, and the value of inertia weight w and three learning factors is limited to a constant, and the algorithm is less efficient in dealing with premature problems. The existing SFL-PSO algorithm is improved to improve the efficiency of test data generation. Firstly, the existing grouping method is improved, and the grouping strategy based on shuffling algorithm is adopted to increase the differences within and between groups and to increase the diversity of population. Secondly, according to the variance of fitness, we adjust w dynamically. When the threshold of fitness variance is set, the adjustment factor is used to increase the value of w, so as to increase the range of particle optimization and make it get rid of the local optimum. The optimal threshold is 0.1, and the efficiency of the algorithm is the highest. Thirdly, using individual optimum, intra-group global optimal, population global optimal fitness value in the sum of the three fitness values assigned to the learning factor C1and C2C2C3 to promote particle learning of the optimal particle in the population and accelerate convergence. The experimental results show that the efficiency of generating test data by this scheme is higher than that of the traditional method. In addition, when the maximum number of iterations in the group is determined to be a value between 511), the performance of the algorithm is better. Finally, the performance of the improved algorithm is verified by experiments. Several typical benchmark programs are selected as the tested programs, and the PSO algorithm is used to generate the test data for each target path by using the improved SFL-PSO algorithm and the SFL-PSO algorithm, respectively. The improved SFL-PSO algorithm has the highest search success rate and the best stability. In addition, the performance of the improved SFL-PSO algorithm is better than that of the SFL-PSO algorithm in terms of the number of iterations and the running time.
【学位授予单位】:山东科技大学
【学位级别】:硕士
【学位授予年份】:2017
【分类号】:TP18;TP311.53

【参考文献】

相关期刊论文 前10条

1 李刚;于磊;孙回回;张兴隆;侯韶凡;;基于变异粒子群算法的字符串型测试数据生成[J];计算机科学;2016年11期

2 贺滢;徐蔚鸿;李杨林;;基于RACPSO的测试用例自动生成方法[J];计算机工程;2016年05期

3 丁蕊;董红斌;张岩;冯宪彬;;基于关键点路径的快速测试用例自动生成方法[J];软件学报;2016年04期

4 周小飞;赵瑞莲;李征;;基于多种群遗传算法的可扩展有限状态机测试数据自动生成[J];计算机应用与软件;2015年11期

5 董跃华;戴玉倩;;一种改进PSO的软件测试数据自动生成算法[J];小型微型计算机系统;2015年09期

6 董跃华;戴玉倩;;混合粒子群算法的软件测试数据自动生成[J];计算机应用;2015年02期

7 邵楠;周雁舟;惠文涛;严亚伟;;基于自适应变异粒子群优化算法的测试数据生成[J];计算机应用研究;2015年03期

8 焦晓璇;景博;黄以锋;邓森;窦雯;;基于模拟退火离散粒子群算法的测试点优化[J];计算机应用;2014年06期

9 毛澄映;喻新欣;薛云志;;基于粒子群优化的测试数据生成及其实证分析[J];计算机研究与发展;2014年04期

10 陈柯;刘久富;朱丹丹;梁娟娟;;基于MPPSO的软件结构测试数据生成方法[J];计算机工程;2013年10期

相关硕士学位论文 前1条

1 陈琳玲;基于简化粒子群算法的测试数据自动生成方法研究[D];西南大学;2010年



本文编号:1904072

资料下载
论文发表

本文链接:https://www.wllwen.com/kejilunwen/zidonghuakongzhilunwen/1904072.html


Copyright(c)文论论文网All Rights Reserved | 网站地图 |

版权申明:资料由用户47a42***提供,本站仅收录摘要或目录,作者需要删除请E-mail邮箱bigeng88@qq.com