Computer Science ›› 2017, Vol. 44 ›› Issue (3): 209-214.doi: 10.11896/j.issn.1002-137X.2017.03.044

Previous Articles     Next Articles

Research on Test Data Automatic Generation Based on Improved Genetic Algorithm

GAO Xue-di, ZHOU Li-juan, ZHANG Shu-dong and LIU Hao-ming   

  • Online:2018-11-13 Published:2018-11-13

Abstract: Automatic test data generation is the basis of software testing,and it is also a key link in the process of test automation technology.In order to improve the efficiency of testing automation,a new algorithm was proposed to improve the traditional genetic algorithm based on the combination of test data automatic generation system model.The adaptive crossover operator and mutation operator are used in this algorithm,and the improved simulated annealing mechanism is introduced to improve it.At the same time,the algorithm is also designed to fit the fitness function to accelerate the optimization process of the data.Through the triangle program,binary search and bubble sort program,the basic genetic algorithm and the adaptive genetic algorithm were compared,and the performance test was done for improved algorithm.Experimental results show the practicability as well as feasibility and efficiency of the algorithm in the test data generation.

Key words: Software test,Generic algorithm,Hamming function,Automatic test data generation

[1] HOLLAND J H.Genetic algorithms and the optimal allocation of trials [J].SIAMJ Comput,1973,2(2):89-104.
[2] NIE P,GENG J,QIN Z G.Survey on automatic test case genera-tion algorithms for software testing[J].Computer application research,2012,29(2):402-405.(in Chinese) 聂鹏,耿技,秦志光.软件测试用例自动生成算法综述[J].计算机应用研究,2012,29(2):402-405.
[3] HUANG L F.Simulation Research on Automatically Generate Software Test Data Algorithm[J].Computer Simulation,2012,9(10):245-247.(in Chinese) 黄丽芬.软件测试数据自动生成算法的仿真研究.[J].计算机仿真,2012,9(10):245-247.
[4] KOREL B.Automated software test data generation[J].IEEE Trans,on Software Engineering,1990,16(8):870-879.
[5] 王小平,曹立明.遗传算法一理论、应用与软件实现[M].西安:西安交通大学出版社,2002.
[6] SRNINASM,PAINAIKM.Adaptive Probabilities of Crossoverand Mutation in Genetic Algorithms[J].IEEE Tram on Systems,Manand Cybe Rnetics,1994,4(4):656-659.
[7] CHEN Y,YAO L.Software Test Data Generation Based on an Improved Generic Algorithm[J].Electronic Science and techno-logy,2009,22(7):9-12.(in Chinese) 陈雨,姚砺.基于改进的遗传算法的测试用例生成.电子科技,2009,22(7):9-12.
[8] ARABALI A,GHOFRANI M.Genetic-Algorithm-Based Opti-mization Approach for Energy Management[J].IEEE Transactions on Power Delivery,2013,8(1):162-170.
[9] LIN J C,YEH P L.Using genetic algorithms for test case genera-tion in path testing[C]∥9th Asian Test Symposium (ATS’00).Taipei,2000:241-246.
[10] LEI H,HAN X.Software Test Data Generation Method Using Hill Climbing Algorithm Combined with a Modified ARPSO[J].Journal of University of Electronic Science and Technology of China,2012,1(6):885-889.(in Chinese) 雷航,韩炫.采用HC-MARPSO算法的软件测试数据生成方法[J].计算机工程与应用,2012,1(6):885-889.
[11] YU B,JIANG S J,ZHANG Y M.Multiple Paths Test CaseGeneration Based on Complex System Genetic Algorithm[J].Computer Science,2012,9(4):139-141.(in Chinese) 于博,姜淑娟,张艳涛.基于复杂系统遗传算法的多路径覆盖测试用例生成方法[J].计算机科学,2012,9(4):139-141.
[12] FRASER G,ARCURI A.Evolutionary Generation of WholeTest Suites[J].International Conference on Quality Software,2011,14(1):31-40.
[13] ZHONG X M,ZHAO X F.Automated test case generationbased on improved tabu search algorithm[J].Computer Engineering and Design,2011,32(7):2058-2060.(in Chinese) 仲晓敏,赵雪峰.基于改进禁忌搜索算法的测试用例自动生成[J].计算机工程与设计,2011,32(7):2058-2060.
[14] FRASER G,ARCURI A.Achieving scalable mutation-basedgeneration of whole test suites[J].Empirical Software Enginee-ring,2014,20(3):783-812.
[15] RAYADURGAM S,HEIMDAHL M P E.Coverage based test-case generation using model checkers[C]∥IEEE International Conference and Workshop on the Engineering of Computer Based Systems.2015:83-91.
[16] WANG Y,WANG C,LIU H L.Application of simulated annealing generic algorithm in multiuser detection technique[J].Communition and Network,2011(4):102-105.(in Chinese) 王彦,王超,刘宏立.模拟退火遗传算法在多用户检测技术中的应用[J].通信与网络,2011(4):102-105.
[17] 邱菊.基于蚁群算法的软件测试用例生成方法研究[J].软件导刊,2011,0(3):73-74.
[18] LU H Q,CHEN L,SONG Y S,et al..An improved crossover operator of genetic algorithm[J].Journal of PLA University of Science and Technology,2007,8(3):250-253.(in Chinese) 卢厚清,陈亮,宋以胜,等.一种遗传算法交叉算子的改进算法[J].解放军理工大学学报,2007,8(3):250-253.
[19] KONG X L,WANG Y,JU A L,et al.An Improved Quantum Evolutionary Algorithm Based on Regulation Law of Hermone in Endocrine System[J].Journal of Northwestern Polytechnical University,2011,9(6):978-983.(in Chinese) 孔晓琳,王毅,巨安丽,等.基于内分泌激素调节机制的量子进化算法[J].西北工业大学学报,2011,29(6):978-983.
[20] MIRZAAGHAEI M,PASTORE F,PEZZ M.Supporting Test Suite Evolution through Test Case Adaptation[C]∥IEEE Fifth International Conference on Software Testing.2012:231-240.

No related articles found!
Full text



[1] LEI Li-hui and WANG Jing. Parallelization of LTL Model Checking Based on Possibility Measure[J]. Computer Science, 2018, 45(4): 71 -75, 88 .
[2] XIA Qing-xun and ZHUANG Yi. Remote Attestation Mechanism Based on Locality Principle[J]. Computer Science, 2018, 45(4): 148 -151, 162 .
[3] LI Bai-shen, LI Ling-zhi, SUN Yong and ZHU Yan-qin. Intranet Defense Algorithm Based on Pseudo Boosting Decision Tree[J]. Computer Science, 2018, 45(4): 157 -162 .
[4] WANG Huan, ZHANG Yun-feng and ZHANG Yan. Rapid Decision Method for Repairing Sequence Based on CFDs[J]. Computer Science, 2018, 45(3): 311 -316 .
[5] SUN Qi, JIN Yan, HE Kun and XU Ling-xuan. Hybrid Evolutionary Algorithm for Solving Mixed Capacitated General Routing Problem[J]. Computer Science, 2018, 45(4): 76 -82 .
[6] ZHANG Jia-nan and XIAO Ming-yu. Approximation Algorithm for Weighted Mixed Domination Problem[J]. Computer Science, 2018, 45(4): 83 -88 .
[7] WU Jian-hui, HUANG Zhong-xiang, LI Wu, WU Jian-hui, PENG Xin and ZHANG Sheng. Robustness Optimization of Sequence Decision in Urban Road Construction[J]. Computer Science, 2018, 45(4): 89 -93 .
[8] LIU Qin. Study on Data Quality Based on Constraint in Computer Forensics[J]. Computer Science, 2018, 45(4): 169 -172 .
[9] ZHONG Fei and YANG Bin. License Plate Detection Based on Principal Component Analysis Network[J]. Computer Science, 2018, 45(3): 268 -273 .
[10] SHI Wen-jun, WU Ji-gang and LUO Yu-chun. Fast and Efficient Scheduling Algorithms for Mobile Cloud Offloading[J]. Computer Science, 2018, 45(4): 94 -99, 116 .