Computer Science ›› 2017, Vol. 44 ›› Issue (6): 177-181.doi: 10.11896/j.issn.1002-137X.2017.06.030

Previous Articles     Next Articles

Test Case Generation Method Based on Adaptive Particle Swarm Optimization

BAO Xiao-an, YANG Ya-juan, ZHANG Na, LIN Qing-xia and YU Cheng-hai   

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

Abstract: Obtaining minimum coverage array is one of the key issues in the combination test.Particle swarm optimization(PSO),as one of the evolutionary search based methods,can obtain the smallest covering arrays,but its performance is significantly impacted by the parameters.To solve this problem,we combined one-test-at-a-time strategy and particle swarm optimization and proposed an adaptive particle swarm optimization algorithm.Based on the quality of the particles in the population,the strategy adaptively adjusts inertia weights which makes it have stronger ability of application.In order to further improve the performance of the algorithm,we constructed a priority measure function which is used to measure the weight of each combination,and we preferred to select a combination which has the highest weight to generate a single test case.Finally the paper implemented the algorithm by programming,and compared this approach with the original particle swarm optimization algorithm in test suite size and generation time.The results show the competitiveness of this approach.

Key words: Combination testing,Covering array generation,Particle swarm optimization,Adaptive algorithm

[1] KUHN D R,WALLACE D R,GALLO A M.Software fault Interactions and implications for software testing[C]∥IEEE Trans.on Software Engineering.2004:418-421.
[2] XIE X Y,XU L,XU B W,et al.Survey of Evolutionary Testing[J].Frontiers of Computer Science & Technology,2008,2(5):449-466.(in Chinese) 谢晓园,许蕾,徐宝文,等.演化测试技术的研究[J].计算机科学与探索,2008,2(5):449-466.
[3] SUN W W,JIANG J,NIE C H.Configurable Hybrid Algorithm for Combinatorial Test Suite Generation[J].Computer Science,2011,38(8):130-135.(in Chinese) 孙文雯,蒋静,聂长海.一种组合测试用例生成的可配置混合算法[J].计算机科学,2011,38(8):130-135.
[4] CHEN X,GU Q,WANG Z Y,et al.Framework of ParticleSwarm Optimization Based Pairwise Testing[J].Journal of Software,2011,2(12):2879-2893.(in Chinese) 陈翔,顾庆,王子元,等.一种基于粒子群优化的成对组合测试算法框架[J].软件学报,2011,2(12):2879-2893.
[5] MAO C Y,YU X X,XUE Y Z.Algorithm Design and Empirical Analysis for Particle Swarm Optimization-Based Test Data Ge-neration[J].Journal of Computer Research and Development,2014,51(4):824-837.(in Chinese) 毛澄映,喻新欣,薛云志.基于粒子群优化的测试数据生成及其实证分析[J].计算机研究与发展,2014,51(4):824-837.
[6] ZHA R J,ZHANG D P,NIE C H,et al.Test Data Generation Algorithms of Combinatorial Testing and Comparison Based on Cross-Entropy and Particle Swarm Optimization Method[J].Journal of Computers,2010,33(10):1896-1908.(in Chinese) 查日军,张德平,聂长海,等.组合测试数据生成的交叉熵与粒子群算法及比较[J].计算机学报,2010,33(10):1896-1908.
[7] WU H Y,NIE C H,LIANG Y L,et al.A Discrete Particle Swarm Optimization for Covering Array Generation[J].IEEE Transactions on Evolutionary Computation,2015,19(4):575-591.
[8] KUHN D,REILLY M.An investigation of the applicabilityof design of experiments to software testing[C]∥Proc.of the 27th Annual NASA Goddard/IEEE Software Engineering Workshop.NASA Goddard Space Flight Center,2002:1-5.
[9] KENNEDY J,EBERHART R.Particle swarm optimization[C]∥Proc of the 4th IEEE Int Conf on Neural Networks.Piscataway,NJ:IEEE,1995:1942-1948.
[10] PARSOPOULOS K E,VRAHATIS M N.Recent approaches to global optimization problems through particle swarm optimization[J].Natural Computing,2002,116(2/3):235-3063.
[11] WANG Z Y,QIAN J,CHEN L,et al.Generating Variable St-rength Combinatorial Test Suite with One-test-at-a-time Strategy[J].Chinese Journal of Computer,2012,5(12):2541-2552.(in Chinese) 王子元,钱巨,陈林,等.基于One-test-at-a-time策略的可变力度组合测试用例生成方法[J].计算机学报,2012,35(12):2541-2552.
[12] ZHANG N,YAO L,BAO X A,et al.Multi-Objective Optimization Based On-Line Adjustment Strategy of Test Case Prioritization[J].Journal of Software,2015(10):2451-2464.(in Chinese) 张娜,姚澜,包晓安,等.多目标优化的测试用例优先级在线调整策略[J].软件学报,2015(10):2451-2464.
[13] ZHEN Z H,ZHANG J,LI Y,et al.Adaptive particle swarm optimization[J].IEEE Transactions on Systems,Man,and Cybernetics,Part B:Cybernetics,2009,9(6):1362-1381.
[14] LI S F,LI T Y.Distance-based Adaptive Fuzzy Particle Swarm Optimization[J].Computer Science,2011,38(8):257-259.(in Chinese) 李朔枫,李太勇.一种基于距离的自适应模糊粒子群优化算法[J].计算机科学,2011,38(8):257-259.
[15] YOU B,CHEN G,GUO W.A Discrete PSO-Based Fault-Tole-rant Topology Control Scheme in Wireless Sensor Networks[C]∥Proceedings of the 5th International Conference on Advances in Computation and Intelligence.2010:1-12.
[16] SU J S,GUO W Z,YU C L,et al.Fault-Tolerance Clustering Algorithm with Load-Balance Aware in Wireless Sensor Network[J].Chinese Journal of Computer,2014,7(2):445-456.(in Chinese) 苏金树,郭文忠,余朝龙,等.负载均衡感知的无线传感器网络容错分簇算法[J].计算机学报,2014,37(2):445-456.

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 .