|
- 2017
基于变异分析和覆盖准则的回归测试用例集缩减
|
Abstract:
软件测试是在软件开发过程中,用以确认和验证软件质量的主要方法。然而测试用例冗余是软件测试面临的一个重要难题。在回归测试中,人们会根据新的测试需求不断补充大量的测试用例,这也会造成测试用例冗余的出现。虽然现在已有很多工具通过重用测试用例集来降低回归测试的成本,但回归测试依然可能是极其耗时的过程。为此,人们提出了各种方法,对已生成的测试用例集进行缩减。虽然一些现有的数据缩减方法可以减少冗余数据,但往往会削弱排除错误的能力。文章通过引入变异分析和覆盖准则来建立回归测试用例集缩减实验的数学模型,并采用多目标进化优化方法来进行求解优化模型。最后采用Siemens suit基准数据集及工业space大程序进行验证,并使用3种进化优化算法进行测试用例集缩减。事实上,对于SIR小程序,NSGA-Ⅱ算法表现最优;对于space大程序,则是MOEA/D-PBI优于NSGA-Ⅱ。实验结果表明,在保证缺陷检测能力不下降的同时,该方法可以有效地缩减测试用例集。
Software testing is one of the main verification and validation methods used in software development. Test case redundancy is a big challenge in software testing. Regression testing occurs whenever the system under test (SUT) or its environment changes, with the regression testing process involving the SUT being tested with the current test suite T or some subset of this (possibly with additional test cases for new code). Although there are many tools that reduce the cost of regression testing by re-applying the test suite T, regression testing can be a time consuming and expensive process. Some existing test case reduction methods can reduce the redundant cases, but tend to weaken defect detection ability. In view of this, the paper proposes a test case reduction method based on mutation analysis and coverage rule, which aims at reducing the redundant degree of test data and improving test efficiency without decreasing the defect detection ability and coverage of test data. We use six evolutionary multi-object optimization algorithms to minimize the test cases. These used three programs from the SIR repository and one larger program. In three SIR programs experiments NSGA-Ⅱ with tuning was the most effective technique. However, MOEA/D-PBI outperformed NSGA-Ⅱ on the larger program (Space). Experimental results prove that the method is indeed effective in reducing the test case redundancy