Debido al alto tráfico generado por robots, aplicamos límites en el número de peticiones permitidas por cliente y bloqueos por IP automáticos. Si haces un uso legítimo y estás teniendo problemas, avísanos para reevaluar nuestras políticas de bloqueo. Disculpa las molestias.

Resumen:
AGORA: Automated Generation of Test Oracles for REST APIs

Autores

Alonso, Juan C.
Segura, Sergio
Ruiz-Cortés, Antonio

Editor

Sistedes

Publicado en

Actas de las XXVIII Jornadas de Ingeniería del Software y Bases de Datos (JISBD 2024)

Licencia Creative Commons

Resumen

Test case generation tools for REST APIs have grown in number and complexity in recent years. However, their advanced capabilities for automated input generation contrast with the simplicity of their test oracles, which limit the types of failures they can detect to crashes, regressions, and violations of the API specification or design best practices. In this paper, we present AGORA, an approach for the automated generation of test oracles for REST APIs through the detection of invariants—properties of the output that should always hold. In practice, AGORA aims to learn the expected behavior of an API by analyzing previous API requests and their corresponding responses. For this, we extended the Daikon tool for dynamic detection of likely invariants, including the definition of new types of invariants and the implementation of an instrumenter called Beet. Beet converts any OpenAPI specification and a collection of API requests and responses to a format processable by Daikon. As a result, AGORA currently supports the detection of up to 105 different types of invariants in REST APIs. AGORA achieved a total precision of 81.2% when tested on a dataset of 11 operations from 7 industrial APIs. More importantly, the test oracles generated by AGORA detected 6 out of every 10 errors systematically seeded in the outputs of the APIs under test. Additionally, AGORA revealed 11 bugs in APIs with millions of users: Amadeus, GitHub, Marvel, OMDb and YouTube. Our reports have guided developers in improving their APIs, including bug fixes and documentation updates in GitHub. Since it operates in black-box mode, AGORA can be seamlessly integrated into existing API testing tools.

Descripción

Acerca de Alonso, Juan C.

Palabras clave

REST APIs, Test Oracle, Invariant Detection, Automated Testing

Citación

Alonso Valenzuela, J. C., Segura Rueda, S., Ruiz Cortés, A.: AGORA: Automated Generation of Test Oracles for REST APIs. In: Rodríguez Luaces, M. A. (ed.) Actas de las XXVIII Jornadas de Ingeniería del Software y Bases de Datos (JISBD 2024). Sistedes (2024). https://hdl.handle.net/11705/JISBD/2024/5