识别用自然语言描述的相似测试用例
Identifying Similar Test Cases That Are Specified in Natural Language
摘要:
尽管最近自动化测试技术有所改进,但在许多行业中,软件测试仍然是一个手工过程。因此,测试用例通常由不同的员工以自然语言指定,并且在测试套件中可能存在许多冗余测试用例。这增加了测试执行的(已经很高的)成本。手动识别相似的测试用例是一项耗时且容易出错的任务。因此,在本文中,我们提出了一种无监督的方法来识别相似的测试用例。我们的方法使用文本嵌入,文本相似性和聚类技术相结合,以确定类似的测试用例。我们评估了五种不同的文本嵌入技术,两个文本相似性度量,和两个聚类技术聚类相似的测试步骤和四种技术,以确定类似的测试用例的测试步骤集群。通过在工业环境中的评估,我们表明,我们的方法实现了高性能的集群测试步骤(87.39%的F分数),并确定类似的测试用例(83.47%的F分数)。此外,开发人员的验证表明我们的方法有几种不同的实际用途(如识别冗余和遗留测试用例),这有助于减少测试手动工作量和时间。
英文摘要:
Software testing is still a manual process in many industries, despite the recent improvements in automated testing techniques. As a result, test cases are often specified in natural language by different employees and many redundant test cases might exist in the test suite. This increases the (already high) cost of test execution. Manually identifying similar test cases is a time-consuming and error-prone task. Therefore, in this paper, we propose an unsupervised approach to identify similar test cases. Our approach uses a combination of text embedding, text similarity and clustering techniques to identify similar test cases. We evaluate five different text embedding techniques, two text similarity metrics, and two clustering techniques to cluster similar test steps and four techniques to identify similar test cases from the test step clusters. Through an evaluation in an industrial setting, we showed that our approach achieves a high performance to cluster test steps (an F-score of 87.39%) and identify similar test cases (an F-score of 83.47%). Furthermore, a validation with developers indicates several different practical usages of our approach (such as identifying redundant and legacy test cases), which help to reduce the testing manual effort and time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。