改進(jìn)SFL-PS0算法的測(cè)試數(shù)據(jù)自動(dòng)生成方法研究
本文選題:測(cè)試數(shù)據(jù)自動(dòng)生成 + SFL-PSO; 參考:《山東科技大學(xué)》2017年碩士論文
【摘要】:軟件測(cè)試是提高軟件質(zhì)量的一種非常重要的方法,自動(dòng)化測(cè)試在提高軟件測(cè)試效率方面發(fā)揮了關(guān)鍵作用,其中重要環(huán)節(jié)是測(cè)試數(shù)據(jù)的自動(dòng)生成,旨在減輕人工生成測(cè)試數(shù)據(jù)的工作量,進(jìn)而提高測(cè)試數(shù)據(jù)生成效率。與遺傳算法、蟻群算法、模擬退化算法等測(cè)試數(shù)據(jù)生成算法相比,粒子群優(yōu)化算法具有參數(shù)少、全局搜索能力強(qiáng)、收斂快的優(yōu)點(diǎn),但在進(jìn)化中后期,由于種群多樣性的減少,造成群體易出現(xiàn)局部最優(yōu),發(fā)生早熟、收斂慢等問(wèn)題。SFL-PSO算法通過(guò)保持群體多樣性可有效減少早熟現(xiàn)象的發(fā)生,但該算法所采用的分組思想使得各分組之間的差異很小,導(dǎo)致粒子群體的多樣性較少,而且,對(duì)慣性權(quán)重w和三個(gè)學(xué)習(xí)因子的取值只限于某個(gè)常數(shù),在處理早熟問(wèn)題時(shí)算法效率較低。對(duì)現(xiàn)有SFL-PSO算法做出改進(jìn),以提高測(cè)試數(shù)據(jù)生成效率。第一,對(duì)現(xiàn)有分組方式做出改進(jìn),采用基于洗牌算法的分組策略,以增大各組內(nèi)及組間的差異,達(dá)到增加種群多樣性的目的。第二,根據(jù)適應(yīng)度方差,對(duì)w進(jìn)行動(dòng)態(tài)調(diào)整,當(dāng)滿(mǎn)足“適應(yīng)度方差設(shè)定閾值”時(shí),采用調(diào)整因子增大w的取值,以增大粒子的尋優(yōu)范圍,使其擺脫局部最優(yōu),并通過(guò)實(shí)驗(yàn)確定了最佳閾值為0.1,此時(shí)算法的效率最高。第三,采用個(gè)體最優(yōu)、組內(nèi)全局最優(yōu)、種群全局最優(yōu)的適應(yīng)度值在三個(gè)適應(yīng)度值之和中所占的權(quán)重對(duì)學(xué)習(xí)因子C_1、C_2、C_3賦值,促進(jìn)粒子對(duì)種群中最優(yōu)粒子的學(xué)習(xí),加快收斂,實(shí)驗(yàn)證明,采用該方案生成測(cè)試數(shù)據(jù)的效率要高于傳統(tǒng)取值方案。此外,通過(guò)實(shí)驗(yàn)確定了當(dāng)組內(nèi)最大迭代次數(shù)取值為(5,11)之間的某個(gè)值時(shí),算法性能較優(yōu)。最后,通過(guò)實(shí)驗(yàn)驗(yàn)證改進(jìn)算法的性能,選取多個(gè)典型的基準(zhǔn)程序作為被測(cè)程序,分別采用PSO算法、SPSO算法、SFL-PSO算法、改進(jìn)SFL-PSO算法為各目標(biāo)路徑生成測(cè)試數(shù)據(jù),結(jié)果表明,改進(jìn)SFL-PSO算法擁有最高的搜索成功率和最佳的穩(wěn)定性,此外,就迭代次數(shù)和運(yùn)行時(shí)間而言,相比SFL-PSO算法,改進(jìn)算法的性能更優(yōu)。
[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.
【學(xué)位授予單位】:山東科技大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2017
【分類(lèi)號(hào)】:TP18;TP311.53
【參考文獻(xiàn)】
相關(guān)期刊論文 前10條
1 李剛;于磊;孫回回;張興隆;侯韶凡;;基于變異粒子群算法的字符串型測(cè)試數(shù)據(jù)生成[J];計(jì)算機(jī)科學(xué);2016年11期
2 賀瀅;徐蔚鴻;李楊林;;基于RACPSO的測(cè)試用例自動(dòng)生成方法[J];計(jì)算機(jī)工程;2016年05期
3 丁蕊;董紅斌;張巖;馮憲彬;;基于關(guān)鍵點(diǎn)路徑的快速測(cè)試用例自動(dòng)生成方法[J];軟件學(xué)報(bào);2016年04期
4 周小飛;趙瑞蓮;李征;;基于多種群遺傳算法的可擴(kuò)展有限狀態(tài)機(jī)測(cè)試數(shù)據(jù)自動(dòng)生成[J];計(jì)算機(jī)應(yīng)用與軟件;2015年11期
5 董躍華;戴玉倩;;一種改進(jìn)PSO的軟件測(cè)試數(shù)據(jù)自動(dòng)生成算法[J];小型微型計(jì)算機(jī)系統(tǒng);2015年09期
6 董躍華;戴玉倩;;混合粒子群算法的軟件測(cè)試數(shù)據(jù)自動(dòng)生成[J];計(jì)算機(jī)應(yīng)用;2015年02期
7 邵楠;周雁舟;惠文濤;嚴(yán)亞偉;;基于自適應(yīng)變異粒子群優(yōu)化算法的測(cè)試數(shù)據(jù)生成[J];計(jì)算機(jī)應(yīng)用研究;2015年03期
8 焦曉璇;景博;黃以鋒;鄧森;竇雯;;基于模擬退火離散粒子群算法的測(cè)試點(diǎn)優(yōu)化[J];計(jì)算機(jī)應(yīng)用;2014年06期
9 毛澄映;喻新欣;薛云志;;基于粒子群優(yōu)化的測(cè)試數(shù)據(jù)生成及其實(shí)證分析[J];計(jì)算機(jī)研究與發(fā)展;2014年04期
10 陳柯;劉久富;朱丹丹;梁娟娟;;基于MPPSO的軟件結(jié)構(gòu)測(cè)試數(shù)據(jù)生成方法[J];計(jì)算機(jī)工程;2013年10期
相關(guān)碩士學(xué)位論文 前1條
1 陳琳玲;基于簡(jiǎn)化粒子群算法的測(cè)試數(shù)據(jù)自動(dòng)生成方法研究[D];西南大學(xué);2010年
,本文編號(hào):1904072
本文鏈接:http://sikaile.net/kejilunwen/zidonghuakongzhilunwen/1904072.html