Search-Based Software Test Data Generation for Path Coverage Based on a Feedback-Directed Mechanism

被引:3
作者
Semujju S.D. [1 ]
Huang H. [1 ]
Liu F. [1 ]
Xiang Y. [1 ]
Hao Z. [2 ]
机构
[1] School of Software Engineering, South China University of Technology, Guangzhou
[2] College of Science, Shantou University, Shantou
来源
Complex System Modeling and Simulation | 2023年 / 3卷 / 01期
基金
中国国家自然科学基金;
关键词
automated test case generation; many-objective optimization; path coverage; software testing;
D O I
10.23919/CSMS.2022.0027
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Automatically generating test cases by evolutionary algorithms to satisfy the path coverage criterion has attracted much research attention in software testing. In the context of generating test cases to cover many target paths, the efficiency of existing methods needs to be further improved when infeasible or difficult paths exist in the program under test. This is because a significant amount of the search budget (i.e., time allocated for the search to run) is consumed when computing fitness evaluations of individuals on infeasible or difficult paths. In this work, we present a feedback-directed mechanism that temporarily removes groups of paths from the target paths when no improvement is observed for these paths in subsequent generations. To fulfill this task, our strategy first organizes paths into groups. Then, in each generation, the objective scores of each individual for all paths in each group are summed up. For each group, the lowest value of the summed up objective scores among all individuals is assigned as the best aggregated score for a group. A group is removed when no improvement is observed in its best aggregated score over the last two generations. The experimental results show that the proposed approach can significantly improve path coverage rates for programs under test with infeasible or difficult paths in case of a limited search budget. In particular, the feedback-directed mechanism reduces wasting the search budget on infeasible paths or on difficult target paths that require many fitness evaluations before getting an improvement. © 2021 TUP.
引用
收藏
页码:12 / 31
页数:19
相关论文
共 39 条
[1]  
Panichella A., Kifetew F. M., Tonella P., Automated test case generation as a many-objective optimisation problem with dynamic selection of the targets, IEEE Trans. Software Eng, 44, 2, pp. 122-158, (2018)
[2]  
Fraser G., Arcuri A., Whole test suite generation, IEEE Trans. Software Eng, 39, 2, pp. 276-291, (2013)
[3]  
Scalabrino S., Grano G., Di Nucci D., Oliveto R., De Lucia A., Search-based testing of procedural programs: Iterative single-target or multi-target approach?, Proc. 8th Int. Symp. Search Based Software Engzneerzng, pp. 64-79, (2016)
[4]  
Horgan J. R., London S., Lyu M. R., Achieving software quality with testing coverage measures, Computer, 27, 9, pp. 60-69, (1994)
[5]  
Huang H., Liu F., Yang Z., Hao Z., Automated test case generation based on differential evolution with relationship matrix for iFogSim toolkit, IEEE Trans. Ind. Inf, 14, 11, pp. 5005-5016, (2018)
[6]  
Wegener J., Baresel A., Sthamer H., Evolutionary test environment for automatic structural testing, Inf. Software Technol, 43, 14, pp. 841-854, (2001)
[7]  
Mala D. J., Mohan V., Kamalapriya M., Automated software test optimisation framework-an artificial bee colony optimisation-based approach, IET Software, 4, 5, pp. 334-348, (2010)
[8]  
Lin J. C., Yeh P. L., Automatic test data generation for path testing using GAs, Inf. Scz, 131, 1-4, pp. 47-64, (2001)
[9]  
Gong D., Zhang W., Yao X., Evolutionary generation of test data for many paths coverage based on grouping, J. Syst. Software, 84, 12, pp. 2222-2233, (2011)
[10]  
Ahmed M. A., Hermadi I., GA-based multiple paths test data generator, Comput. Oper. Res, 35, 10, pp. 3107-3124, (2008)