# Automated Test-Case Generation for REST APIs Using Model Inference Search Heuristic

arXiv: https://arxiv.org/abs/2412.03420 · HTML: https://mlsanity.com/paper/2412.03420/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 8 of its 58 references that are in the map.
- First posted on arXiv 4 Dec 2024.

## Builds on (most cited first, 8 of 8)

- [Single and Multi-objective Test Cases Prioritization for Self-driving Cars in Virtual Environments](https://mlsanity.com/paper/2107.09614/) (2021)
- [Design, Monitoring, and Testing of Microservices Systems: The Practitioners' Perspective](https://mlsanity.com/paper/2108.03384/) (2021)
- [Many Independent Objective (MIO) Algorithm for Test Suite Generation](https://mlsanity.com/paper/1901.01541/) (2019)
- [Learning State Machines to Monitor and Detect Anomalies on a Kubernetes Cluster](https://mlsanity.com/paper/2207.12087/) (2022)
- [Improving Test Case Generation for REST APIs Through Hierarchical Clustering](https://mlsanity.com/paper/2109.06655/) (2021)
- [Advanced White-Box Heuristics for Search-Based Fuzzing of REST APIs](https://mlsanity.com/paper/2309.08360/) (2023)
- [EvoMaster: Evolutionary Multi-context Automated System Test Generation](https://mlsanity.com/paper/1901.04472/) (2019)
- [CATMA: Conformance Analysis Tool For Microservice Applications](https://mlsanity.com/paper/2401.09838/) (2024)

## Abstract (arXiv)

The rising popularity of the microservice architectural style has led to a growing demand for automated testing approaches tailored to these systems. EvoMaster is a state-of-the-art tool that uses Evolutionary Algorithms (EAs) to automatically generate test cases for microservices' REST APIs. One limitation of these EAs is the use of unit-level search heuristics, such as branch distances, which focus on fine-grained code coverage and may not effectively capture the complex, interconnected behaviors characteristic of system-level testing. To address this limitation, we propose a new search heuristic (MISH) that uses real-time automaton learning to guide the test case generation process. We capture the sequential call patterns exhibited by a test case by learning an automaton from the stream of log events outputted by different microservices within the same system. Therefore, MISH learns a representation of the systemwide behavior, allowing us to define the fitness of a test case based on the path it traverses within the inferred automaton. We empirically evaluate MISH's effectiveness on six real-world benchmark microservice applications and compare it against a state-of-the-art technique, MOSA, for testing REST APIs. Our evaluation shows promising results for using MISH to guide the automated test case generation within EvoMaster.
