一句话:提出 LT-MOSA,用凝聚层次聚类学习并保留 REST API 请求序列模式,提升测试覆盖与真实故障发现。
针对 REST API 系统级测试,进化算法中的交叉与变异算子完全随机,可能破坏搜索中发现的有潜力的 API 请求序列模式,降低测试用例生成效果。本文提出 LT-MOSA:利用凝聚层次聚类(AHC)推断连接树模型,捕获、复制并保留这些请求序列模式,并据此生成新测试用例。作者在 7 个真实基准应用上以分支覆盖率和真实故障检测能力进行实证研究,并与先进白盒技术 MIO、MOSA 比较。结果显示,LT-MOSA 在 7 个应用中分别有 4 个和 5 个应用在行/分支测试目标覆盖上显著优于 MIO 和 MOSA;还发现了 MIO 与 MOSA 未检测到的 27 个和 18 个唯一真实故障。
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.
@inproceedings{paperbot6475,
title = {Improving Test Case Generation for REST APIs Through Hierarchical Clustering},
author = {Dimitri Stallenberg and Mitchell Olsthoorn and Annibale Panichella},
booktitle = {ASE},
year = {2021},
doi = {10.1109/ase51524.2021.9678586}
}