paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Differential regression testing for REST APIs

REST API 的差分回归测试
ISSTA Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis2020匹配度 2/10 · 论文主题是 REST API 的差分回归测试与状态化模糊测试,属于软件测试/服务演进方向,不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,因此与用户研究画像的核心方向关联很弱。引用 53 inbox
Patrice Godefroid, Daniel Lehmann, Marina Polishchuk
crossref: 2026-09-12

AI 速览

一句话:提出基于差分测试的 REST API 回归测试方法,通过比较不同版本的行为差异自动发现规范与服务的破坏性变更。

REST API 持续演化,如何在支持多版本的同时防止破坏性变更是一大难题。本文提出 REST API 的差分回归测试,基于两点观察:破坏性变更涉及客户端与服务两个组件,因此回归也分为 API 规范(客户端与服务间契约)回归和服务自身回归;检测这两类回归需沿“服务变更”和“规范变更”两个维度测试。为此采用差分测试,比较不同版本在相同输入下的行为差异并从中发现回归。输入(HTTP 请求序列)由有状态模糊测试器 RESTler 生成,比较 HTTP 响应时需应对抽象化细微差异、请求乱序和非确定性等挑战。在 2016 至 2019 年间部署的 17 个 Azure 网络 API 版本上,共检测出 14 个回归,其中 5 个位于官方 API 规范,9 个位于服务实现本身。

问题
REST API 不断演化,需要在支持多个版本的同时自动检测破坏性变更,包括 API 规范契约回归与服务实现回归。
方法
采用差分测试,比较不同版本服务在相同输入下的行为差异以发现回归;输入由有状态模糊测试器 RESTler 生成,响应比较时处理抽象化、乱序请求与非确定性等挑战。
评估
在 2016 至 2019 年间部署的 17 个 Azure 网络 API 版本上评估,共检出 14 个回归,其中 5 个在官方 API 规范中、9 个在服务本身。
原文摘要(Abstract)

Cloud services are programmatically accessed through REST APIs. Since REST APIs are constantly evolving, an important problem is how to prevent breaking changes of APIs, while supporting several different versions. To find such breaking changes in an automated way, we introduce differential regression testing for REST APIs. Our approach is based on two observations. First, breaking changes in REST APIs involve two software components, namely the client and the service. As such, there are also two types of regressions: regressions in the API specification, i.e., in the contract between the client and the service, and regressions in the service itself, i.e., previously working requests are "broken" in later versions of the service. Finding both kinds of regressions involves testing along two dimensions: when the service changes and when the specification changes. Second, to detect such bugs automatically, we employ differential testing. That is, we compare the behavior of different versions on the same inputs against each other, and find regressions in the observed differences. For generating inputs (sequences of HTTP requests) to services, we use RESTler, a stateful fuzzer for REST APIs. Comparing the outputs (HTTP responses) of a cloud service involves several challenges, like abstracting over minor differences, handling out-of-order requests, and non-determinism. Differential regression testing across 17 different versions of the widely-used Azure networking APIs deployed between 2016 and 2019 detected 14 regressions in total, 5 of those in the official API specifications and 9 regressions in the services themselves.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6067,
  title = {Differential regression testing for REST APIs},
  author = {Patrice Godefroid and Daniel Lehmann and Marina Polishchuk},
  booktitle = {ISSTA},
  year = {2020},
  doi = {10.1145/3395363.3397374}
}