paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Combinatorial testing of RESTful APIs

RESTful API 的组合测试
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 1/10 · 该论文研究 RESTful API 的组合测试,属于传统软件测试与调试领域,不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心方向。虽然其工业测试场景与用户对落地案例的兴趣有微弱交集,但整体与研究画像基本无关。引用 56 inbox
Huayao Wu, Lixin Xu, Xintao Niu, Changhai Nie
crossref: 2026-09-12

AI 速览

一句话:提出 RestCT,仅依据 Swagger 规约自动建模并生成组合测试用例,覆盖操作间与参数间交互,发现 8 个新缺陷。

该文针对 RESTful API 测试中操作间交互与单个操作内输入参数交互难以系统覆盖、测试建模依赖人工的问题,提出系统且全自动的组合测试方法 RestCT。其核心是两阶段测试用例生成:首先生成受约束的序列覆盖数组,以确定可执行操作的执行顺序;随后采用自适应策略生成并精化若干受约束覆盖数组,具体化每个操作的输入参数。整个流程——包括组合测试模型的构建、操作间与参数间依赖关系的推断,以及测试用例的生成与执行——仅需给定 RESTful API 的 Swagger 规约即可完成,无需人工干预。作者在 11 个真实 RESTful API 上开展实验,验证了 RestCT 的有效性与效率,其共发现 8 个新缺陷,而当前最先进的 RESTful API 测试工具仅能触发其中 1 个。

问题
RESTful API 测试需要同时覆盖多个操作之间的交互以及单个操作内输入参数的交互,而已有方法难以自动构建此类组合测试模型并推断依赖关系。
方法
RestCT 从 Swagger 规约自动推断操作与参数间的依赖,先以受约束的序列覆盖数组确定操作执行顺序,再用自适应策略生成并精化受约束覆盖数组以实例化各操作的输入参数。
评估
在 11 个真实 RESTful API 上进行实验,考察有效性与效率;RestCT 共发现 8 个新缺陷,其中仅 1 个可被最先进的 RESTful API 测试工具触发。
原文摘要(Abstract)

This paper presents RestCT, a systematic and fully automatic approach that adopts Combinatorial Testing (CT) to test RESTful APIs. RestCT is systematic in that it covers and tests not only the interactions of a certain number of operations in RESTful APIs, but also the interactions of particular input-parameters in every single operation. This is realised by a novel two-phase test case generation approach, which first generates a constrained sequence covering array to determine the execution orders of available operations, and then applies an adaptive strategy to generate and refine several constrained covering arrays to concretise input-parameters of each operation. RestCT is also automatic in that its application relies on only a given Swagger specification of RESTful APIs. The creation of CT test models (especially, the inferring of dependency relationships in both operations and input-parameters), and the generation and execution of test cases are performed without any human intervention. Experimental results on 11 real-world RESTful APIs demonstrate the effectiveness and efficiency of RestCT. In particular, RestCT can find eight new bugs, where only one of them can be triggered by the state-of-the-art testing tool of RESTful APIs.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6928,
  title = {Combinatorial testing of RESTful APIs},
  author = {Huayao Wu and Lixin Xu and Xintao Niu and Changhai Nie},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510151}
}