arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2109.06655cs.SEcs.AI
收藏

通过层次聚类改进REST API测试用例生成

Improving Test Case Generation for REST APIs Through Hierarchical Clustering

Delft University of Technology(代尔夫特理工大学)

Dimitri Stallenberg, Mitchell Olsthoorn, Annibale Panichella

摘要:

随着Web API在现代应用程序中的使用越来越多,对系统进行整体测试变得越来越重要。在过去的十年中,已经提出了一些工具和方法来使用进化算法(EA)自动创建这些API的系统级测试用例。EA的一个限制因素是遗传算子(交叉和变异)是完全随机的,可能会破坏搜索过程中发现的API请求序列中有希望的模式。打破这些模式会对测试用例生成过程的有效性产生负面影响。为了解决这个问题,本文提出了一种新的方法,使用凝聚层次聚类(AHC)推断的链接树模型,捕捉,复制,并保留这些模式在新的测试用例。我们评估我们的方法,称为LT-MOSA,通过对7个真实世界的基准应用程序进行实证研究w.r.t.分支覆盖率和实际故障检测能力。我们还将LT-MOSA与现有的两种用于REST API测试的最先进的白盒技术(MIO,MOSA)进行了比较。我们的结果表明,LT-MOSA实现了测试目标覆盖率的统计学显著增加(即,与MIO和MOSA相比,在7项申请中,分别有4项和5项申请得到了支持。此外,LT-MOSA发现27和18个独特的真实故障,留下未检测到的MIO和MOSA,分别。

英文摘要:

With the ever-increasing use of web APIs in modern-day applications, it is becoming more important to test the system as a whole. In the last decade, tools and approaches have been proposed to automate the creation of system-level test cases for these APIs using evolutionary algorithms (EAs). One of the limiting factors of EAs is that the genetic operators (crossover and mutation) are fully randomized, potentially breaking promising patterns in the sequences of API requests discovered during the search. Breaking these patterns has a negative impact on the effectiveness of the test case generation process. To address this limitation, this paper proposes a new approach that uses agglomerative hierarchical clustering (AHC) to infer a linkage tree model, which captures, replicates, and preserves these patterns in new test cases. We evaluate our approach, called LT-MOSA, by performing an empirical study on 7 real-world benchmark applications w.r.t. branch coverage and real-fault detection capability. We also compare LT-MOSA with the two existing state-of-the-art white-box techniques (MIO, MOSA) for REST API testing. Our results show that LT-MOSA achieves a statistically significant increase in test target coverage (i.e., lines and branches) compared to MIO and MOSA in 4 and 5 out of 7 applications, respectively. Furthermore, LT-MOSA discovers 27 and 18 unique real-faults that are left undetected by MIO and MOSA, respectively.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑