Test Case Reuse and Generation Between Similar Programs Based on Function Influence

被引:0
|
作者
Qian Z.-S. [1 ]
Song J. [1 ]
Yu Q.-Y. [1 ]
Cheng Y.-W. [1 ]
Sun Z.-W. [1 ]
机构
[1] School of Information Management, Jiangxi University of Finance & Economics, Jiangxi, Nanchang
来源
关键词
function influence; key function; program similarity; regression test; test case;
D O I
10.12263/DZXB.20210953
中图分类号
学科分类号
摘要
In the process of regression testing, the reuse of test cases is a critical activity. It makes full use of the resources before updating the software to improve the efficiency of software testing. According to the existing results, most of them on regression testing focus on the test case prioritization, and a few mention the use of similarity before and after the programs upgrade changes to reuse test cases to improve the efficiency of test case generation. Aiming at the test case reuse in regression testing, this paper proposes an approach to reuse test data of similar programs before the change, and employs the fitness function designed to evolve to generate new test cases for the program after the change. It utilizes the function call graph constructed to detect similar parts of the programs. And according to the function influence, the fitness function is designed to adjust the fitness value of the individual, and excellent individuals with high fitness value are retained. Then, it reuses the test cases of the similar part before the change and the part of the test cases generated in the evolutionary process after the change, to form the test cases of the new program in the regression test. The experimental results show that, compared to the classical methods, the target path coverage rate of the proposed method is increased by 8% and 17% for small- and medium-sized, and large-sized industrial programs, respectively. © 2022 Chinese Institute of Electronics. All rights reserved.
引用
收藏
页码:1696 / 1707
页数:11
相关论文
共 18 条
  • [1] DI NUCCI D, PANICHELLA A, ZAIDMAN A, Et al., A test case prioritization genetic algorithm guided by the hypervolume indicator, IEEE Transactions on Software Engineering, 46, 6, pp. 674-696, (2020)
  • [2] PEI Han-yu, YIN Bei-bei, XIE Min, Et al., Dynamic random testing with test case clustering and distance-based parameter adjustment[J/OL], Information and Software Technology, 131, (2021)
  • [3] NAIR A, ROY A, MEINKE K., funcGNN: A graph neural network approach to program similarity, ESEM'20: Proceedings of the 14th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pp. 1-11, (2020)
  • [4] LI Mei, GAO Qing, MA Sen, Et al., Enhanced simhash algorithm for code similarity detection, Journal of Software, 32, 7, pp. 2242-2259, (2021)
  • [5] LIU Fang, LI Ge, HU Xing, Et al., Program comprehension based on deep learning, Journal of Computer Research and Development, 56, 8, pp. 1605-1620, (2019)
  • [6] ZHANG B, SHAN C, HUSSAIN M, Et al., Software crucial functions ranking and detection in dynamic execution sequence patterns, International Journal of Software Engineering and Knowledge Engineering, 30, 5, pp. 695-719, (2020)
  • [7] XIA Chun-yan, ZHANG Yan, WAN Li, Et al., Test data generation of path coverage based on negative selection genetic algorithm, Acta Electronica Sinica, 47, 12, pp. 2630-2638, (2019)
  • [8] WANG Shu-yan, WANG Rui, SUN Jia-ze, Test case generation method based on improved bacterial foraging optimization algorithm, Journal of Computer Applications, 39, 3, pp. 845-850, (2019)
  • [9] XIA Chun-yan, ZHANG Yan, SONG Li, Evolutionary generation of test data for paths coverage based on node probability, Journal of Software, 27, 4, pp. 802-813, (2016)
  • [10] YAO Xiang-juan, GONG Dun-wei, LI Bin, Evolutional test data generation for path coverage by integrating neural network, Journal of Software, 27, 4, pp. 828-838, (2016)