arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.08209cs.SE
收藏

Restats:RESTful API的测试覆盖工具

Restats: A Test Coverage Tool for RESTful APIs

Davide Corradini, Amedeo Zampieri, Michele Pasqua, Mariano Ceccato

摘要:

测试覆盖率是用来评估测试套件完整性的标准度量。覆盖率通常在源代码上计算,通过评估源代码实体的范围(例如,语句、数据依赖、控制依赖)。在考虑REST API时,评估测试套件完整性的另一个角度是服务定义。本文介绍了Restats,一个用于REST API的测试覆盖工具,它支持八个最先进的测试覆盖度量,具有黑盒视角,即,仅依赖于测试中REST API的OpenAPI接口规范。事实上,度量是通过只观察测试时发生的HTTP请求和响应来计算的,并且不需要访问REST API的源代码/编译代码。这些覆盖率度量对以下人员来说很有用:(i)从事开发和维护任务的开发人员和测试工程师;(ii)想要评估验收测试完整性的利益相关者和客户;(iii)对比较不同的自动化测试用例生成策略感兴趣的研究人员。

英文摘要:

Test coverage is a standard measure used to evaluate the completeness of a test suite. Coverage is typically computed on source code, by assessing the extent of source code entities (e.g., statements, data dependencies, control dependencies) that are exercised when running test cases. When considering REST APIs, an alternative perspective to assess test suite completeness is with respect to the service definition. This paper presents Restats, a test coverage tool for REST APIs that supports eight state-of-the-art test coverage metrics with a black-box perspective, i.e., only relying on the OpenAPI interface specification of the REST API under test. In fact, metrics are computed by only observing the HTTP requests and responses occurring at testing time, and no access to source/compiled code of the REST API is required. These coverage metrics come in handy for: (i) developers and test engineers working at development and maintenance tasks; (ii) stakeholders and customers who want to evaluate the completeness of acceptance tests; (iii) researches interested in comparing different automated test case generation strategies.

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

↑