arXiv:2608.28114cs.SEAug 2026

Manuscript Offprint

arXiv:2608.28114

RESTCov: A Tool for Structural Coverage Analysis of REST APIs

Tolgahan Bardakci, Serge Demeyer

Tolgahan Bardakci

Computer Science

University of Antwerp and Flanders Make

Antwerp, Belgium

tolgahan.bardakci@uantwerpen.be

Serge Demeyer

Computer Science

University of Antwerp and Flanders Make

Antwerp, Belgium

serge.demeyer@uantwerpen.be

Abstract—REST APIs are widely used in modern software systems, but developers and testers often lack visibility into which parts of an API specification are exercised by a test suite. Traditional coverage analysis usually relies on source-code instrumentation, which is impractical for REST APIs that are distributed, externally maintained, and hence accessible only through black-box execution. This paper presents RESTCov, a lightweight tool that computes structural REST API coverage from an OpenAPI specification and observed HTTP request/response logs, reporting coverage across paths, operations, parameters, media types, status codes, and status classes. RESTCov produces both machine-readable results and a human-readable HTML report, helping users inspect coverage gaps, diagnose specification-log mismatches, and evaluate REST API test suites without requiring access to the implementation.

Screencast: https://youtu.be/mNz2P43OyUc

Repository: https://github.com/2tolgahan2/RESTCov

Index Terms—Software Testing, API Testing, Test Coverage

I. INTRODUCTION

REST APIs are central interfaces for modern software systems, enabling communication between services, applications, and organizations [1], [2]. As these APIs evolve, their OpenAPI specification [3] and their actual implementation can drift out of sync: endpoints can be added, removed, or change behavior without a corresponding update to the specification. Testing plays an important role in surfacing this drift by verifying that the documented behavior is exercised by existing test suites or observed in client interactions. For developers and testers, this requires visibility into which parts of an API have actually been exercised.

Coverage analysis is a widely used method for assessing test sufficiency and understanding which parts of a system have been exercised [4]. Coverage is often computed through source-code instrumentation. However, for REST APIs, this is not always possible or desirable. The implementation may be unavailable, distributed across multiple services, or maintained by another team. In these situations, testers may still have access to two artifacts: an API specification and logs of observed HTTP traffic. Together, these artifacts enable black-box coverage analysis by comparing executed requests with the documented API behavior.

This work is supported by the Research Foundation Flanders (FWO) via the BaseCamp Zero Project under Grant number S000323N.

OpenAPI specifications [3] describe structural elements of REST APIs, such as paths, operations, parameters, media types, and expected response codes. These elements provide a practical basis for measuring how much of a documented API has been exercised. However, in practice, mapping observed traffic back to a specification is not always straightforward. Logs may contain requests that cannot be matched to any documented operation in the OpenAPI specification. We refer to these as unmatched requests. This may happen because the request targets an undocumented endpoint, the path is malformed or encoded differently, or the implementation and specification have evolved out of sync [5]. If such cases are hidden, coverage results become harder to interpret. The missing coverage may reflect either untested API behavior or traffic that falls outside the documented API.

To address this need, we present RESTCov, a lightweight tool for black-box coverage analysis of REST APIs. RESTCov takes an OpenAPI specification and observed HTTP logs, maps executed requests to documented API elements, and reports coverage across paths, operations, parameters, media types, status codes, and status classes. It produces machine-readable results and a human-readable HTML report to inspect coverage gaps and diagnose unmatched requests. This supports API maintenance and evolution by helping developers assess regression suites, detect specification-log drift, and prioritize test or documentation updates.

This paper makes the following contributions:

• We present RESTCov, a lightweight tool for computing structural REST API coverage from an OpenAPI specification and observed HTTP traffic, without requiring source-code instrumentation.

• We describe the coverage dimensions supported by RESTCov, including paths, operations, parameters, media types, status codes, and status classes.

• We demonstrate RESTCov’s machine- and human-readable outputs, including unmatched request samples to diagnose specification-log mismatches.

• We provide a reusable artifact with source code, example inputs, documentation, and expected outputs to support practical use and future experimentation.