针对在回归测试过程中,因为不断修复软件中存在的缺陷所造成的测试工作量大、测试效率低等问题,将测试用例选择与优先级排序技术相结合,以面向函数调用的路径覆盖生成方法为基础,提出了一种面向函数调用路径(functions calling path,FCP)的测试用例选择与排序方法。根据函数调用关系图,对程序中被修改函数与其他函数的关联性进行分析,从初始测试用例集中选择测试用例,形成回归测试用例集;然后对这些测试用例进行优先级排序,并动态地调整优先级排序结果;最后对优先级排序结果进行再次选择,确定最小的回归测试用例集。实验结果表明,测试用例选择与排序方法对优化回归测试用例是有效的,大大减少了回归测试用例数量,降低了回归测试成本。
In order to reduce test workload and improve test efficiency in the regression test, this paper combined test case selection and prioritization, proposed a method of regression test case selection and prioritization based on function calling paths (abbreviation: FCP). First, based on the function call graph,it analyzed the relevance between modified functions and others, and chose test cases. Second,it prioritized test cases and dynamically adjusted prioritization result. Finally, it chose test cases again and determined the minimum set of regression test cases. The experiments show that the proposed method of regression test case selection and prioritization is effective,which can reduce the number of test cases and the cost of regression test greatly.