Automatic Test Data Generation for RESTful APIs: A Case Study on a Governmental System
Authors:
- Wanderson ValentimWVWanderson Valentim
- João Victor Silva CostaJCJoão Victor Silva Costa
- Stevão Alves AndradeSAStevão Alves Andrade
- Allysson Allex AraÚJoAAAllysson Allex AraÚJo
- Pedro Henrique Dias VallePVPedro Henrique Dias Valle
- Williamson Alison Freitas SilvaWSWilliamson Alison Freitas Silva
- Plínio VilelaPVPlínio Vilela
- Pedro Ivo Garcia-NunesPGPedro Ivo Garcia-Nunes
- Ricardo Ferreira VilelaRVRicardo Ferreira Vilela
Preprint
- 7 September 2026
- preprint
- Published by Elsevier in SSRN Electronic Journal
Abstract
RESTful Application Programming Interfaces (APIs) are central to the integration of distributed systems, where interface failures can affect multiple dependent services. Automated test generation can reduce the manual effort that this testing requires, but the evidence on how different generation techniques behave in real operational contexts remains limited. This paper reports a case study comparing three techniques implemented in EvoMaster, Random (RANDOM), Whole Test Suite (WTS), and Smart Sampling (SMARTS), applied to the CMDE API, a national-scale governmental API maintained by the Brazilian Ministry of Education to support the Pé-de-Meia student-retention program. The techniques were evaluated using REST-specific coverage criteria, wall-clock execution time, and test-suite size. SMARTS achieved significantly lower coverage than RANDOM and WTS on Request Parameter Coverage, Request Parameter Value Coverage, and Response Body Properties Coverage, despite generating the largest test suites in significantly less execution time, a trade-off that test-suite size alone would not reveal. The study also identified undocumented response status codes, an internally inconsistent enum/type definition, and inconsistent pagination-field types in the OpenAPI contract, which the development team subsequently corrected. Overall, the findings offer practical guidance for selecting test-generation techniques and show how automated testing can reveal specification-quality problems in a real government system.Keywords
This publication has 12 references indexed in Scilit:
- Automated test generation for REST APIs: no time to rest yet2022
- Contemporary Empirical Methods in Software Engineering2020
- An Insight Into Test Case Optimization: Ideas and Trends With Future PerspectivesIEEE Access, 2019
- RESTful API Automated Test Case Generation with EvoMasterACM Transactions on Software Engineering and Methodology, 2019
- Test suite generation with the Many Independent Objective (MIO) algorithmInformation and Software Technology, 2018
- Whole Test Suite GenerationIEEE Transactions on Software Engineering, 2012
- Experimentation in Software Engineering2012
- Guidelines for conducting and reporting case study research in software engineeringEmpirical Software Engineering, 2008
- Search‐based software test data generation: a surveySoftware Testing, Verification and Reliability, 2004
- Multiple Comparisons Using Rank SumsTechnometrics, 1964