摘要
针对在回归测试中原有测试数据集往往难以满足新版本软件测试需求的问题,提出一种基于自适应粒子群算法(APSO)的测试数据扩增方法。首先,根据原有测试数据在新版本程序上的穿越路径与目标路径的相似度,在原有的测试数据集中选择合适的测试数据,作为初始种群的进化个体;然后,利用初始测试数据的穿越路径与目标路径的不同子路径,确定造成两者路径偏离的输入分量;最后,根据路径相似度构建适应度函数,利用APSO操作输入分量,生成新的测试数据。该方法针对四个基准程序与基于遗传算法(GA)和随机法的测试数据扩增方法相比,测试数据扩增效率分别平均提高了约56%和81%。实验结果表明,所提方法在回归测试方面有效地提高了测试数据扩增的效率,增强了其稳定性。
It is difficult for the original test data to meet the requirements of the new version of software testing in regression testing, thus a new test data augmentation method based on Adaptive Particle Swarm Optimization (APSO) algorithm was proposed to solve the problem. Firstly, according to the similarity between the cross path and the target path of the original test data in the new version of the program, the appropriate test data in the original test data was chosen as evolutionary individual of initial population. Secondly, taking advantage of different sub-paths of the cross path of initial test data and target path, the input component which caused deviation between them was confirmed. Finally, the fitness function was created according to the path similarity, and the new data was generated by using the APSO algorithm to operate the input component. Compared with the genetic algorithm based and random algorithm based test data augmentation methods on four benchmark programs, the augmentation efficiency of the proposed method was improved on average by approximately 56% and 81% respectively. The experimental results show that the proposed method can effectively increase the efficiency and improve the stability of test data augmentation in regression testing.
出处
《计算机应用》
CSCD
北大核心
2016年第9期2492-2496,共5页
journal of Computer Applications
基金
陕西省自然科学基金资助项目(2015JM6359)
西安市科技计划项目(CXY1516(4))
陕西省教育厅自然科学基金资助项目(15JK1672
15JK1678)
陕西省工业攻关项目(2016GY-089)~~
关键词
回归测试
目标路径
测试数据扩增
路径相似度
粒子群优化算法
regression testing
target path
test data augmentation
path similarity
Particle Swarm Optimization (PSO)algorithm