基于神经网络的回归测试用例优化研究
2015-10-22黄伟杨金凤
黄伟 杨金凤


摘 要: 回归测试是指修改了源代码后,重新进行测试以确认已发现的缺陷是否修复和检测修改是否引入了新的错误或导致其他代码产生错误,在测试过程中占有很大的工作量比重。通过分析神经网络的基本原理,并将BP算法的思想引入到回归测试的用例集选取中,介绍了回归测试用例包选取的算法,通过样本训练,筛选出代码改动后可能影响到的功能,从而可以筛选出优先级别较高的用例。最后,通过测试实践的积累,总结了一套高效易行的回归测试策略。
关键词: 回归测试; 测试用例; 神经网络; BP网络
中图分类号: TN711?34 文献标识码: A 文章编号: 1004?373X(2015)19?0114?03
Abstract: Regression testing means after modifying the source code, re?testing to confirm whether the discovered defect is repaired, and whether detection and modification have brought in a new bug or caused the errors in other codes which possesses a large proportion of the workload during testing procedure. The fundamental principle of neural network is analyzed, and the thought of BP algorithm is introduced into the case set selection of regression testing. The algorithm to select regression testing case package is presented. The functions which may be influenced by code modification are screened out by samples training, and the higher priority use case can be screened out. A set of regression testing strategy with high efficient and easy operation was summed up through the accumulation of testing practice.
Keywords: regression testing; testing case; neural network; BP network
0 引 言
软件分析,设计过程中难免有各种各样的错误,需要通过测试查找错误,以保证软件的质量。软件测试是由人工或计算机来执行或评价软件的过程,验证软件是否满足规定的需求或识别期望的结果和实际结果之间有无差别。大量统计资料表明,软件测试工作量往往占软件开发总量的40%以上。而回归测试作为软件生命周期的一个组成部分,在整个软件测试过程中占有很大的工作量比重,软件开发的各个阶段都会进行多次回归测试。在渐进和快速迭代开发中,新版本的连续发布使回归测试变得更加频繁,而在极端编程方法中,更是要求每天都进行若干次回归测试。因此,研究回归测试方法,尽可能地将软件存在的问题找出来,对保证软件质量和提升测试工作效率都是非常有意义的。……
