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

Clinton Cao, Annibale Panichella, Sicco Verwer
12/4/2024
cs.SEcs.AI

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cao2024automated,
  title  = {Automated Test-Case Generation for REST APIs Using Model Inference Search Heuristic},
  author = {Clinton Cao and Annibale Panichella and Sicco Verwer},
  year   = {2024},
  eprint = {2412.03420},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.03420v2}
}

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/2412.03420.svg)](https://codeofpaper.com/paper/2412.03420)

Discussion