一句话:提出基于高频应用特性的自然语言手工测试用例优先级排序方法,用零样本分类与NSGA-II优化排序。
游戏等行业仍依赖人工测试,短发布周期和有限资源使全部执行不现实。传统优先级排序多依赖源码或执行历史,难以用于自然语言人工测试用例。本文提出基于被测应用特性(尤其高频使用特性)的方法:先用零样本分类从自然语言用例中识别覆盖特性,再据此排序,并采用NSGA-II进行多目标优化,以最大化高频特性尽早覆盖并最小化累计执行时间。评估显示,强零样本预训练模型集成识别特性的F-score达76.1%,所提排序能在测试早期覆盖高频特性且执行时间较短。
Software testing is still a manual activity in many industries, such as the gaming industry. But manually executing tests becomes impractical as the system grows and resources are restricted, mainly in a scenario with short release cycles. Test case prioritization is a commonly used technique to optimize the test execution. However, most prioritization approaches do not work for manual test cases as they require source code information or test execution history, which is often not available in a manual testing scenario. In this paper, we propose a prioritization approach for manual test cases written in natural language based on the tested application features (in particular, highly-used application features). Our approach consists of (1) identifying the tested features from natural language test cases (with zero-shot classification techniques) and (2) prioritizing test cases based on the features that they test. We leveraged the NSGA-II genetic algorithm for the multi-objective optimization of the test case ordering to maximize the coverage of highly-used features while minimizing the cumulative execution time. Our findings show that we can successfully identify the application features covered by test cases using an ensemble of pre-trained models with strong zero-shot capabilities (an F-score of 76.1%). Also, our prioritization approaches can find test case orderings that cover highly-used application features early in the test execution while keeping the time required to execute test cases short. QA engineers can use our approach to focus the test execution on test cases that cover features that are relevant to users.