Restats: A Test Coverage Tool for RESTful APIs

Davide Corradini, Amedeo Zampieri, Michele Pasqua, Mariano Ceccato
8/18/2021
cs.SE

Official code: SeUniVr/restats (21 stars, Python, MIT, last commit 2026-10-16).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

SeUniVr/restatsOfficial100%
MIT

A tool for REST API test coverage computation

216PythonJun 23, 20211 months agoMIT

Similar Papers

Cite this paper

@article{corradini2021restats,
  title  = {Restats: A Test Coverage Tool for RESTful APIs},
  author = {Davide Corradini and Amedeo Zampieri and Michele Pasqua and Mariano Ceccato},
  year   = {2021},
  eprint = {2108.08209},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.08209}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2108.08209.svg)](https://codeofpaper.com/paper/2108.08209)

Discussion