Improving Test Case Generation for REST APIs Through Hierarchical Clustering

09/14/2021
by   Dimitri Stallenberg, et al.
0

With the ever-increasing use of web APIs in modern-day applications, it is becoming more important to test the system as a whole. In the last decade, tools and approaches have been proposed to automate the creation of system-level test cases for these APIs using evolutionary algorithms (EAs). One of the limiting factors of EAs is that the genetic operators (crossover and mutation) are fully randomized, potentially breaking promising patterns in the sequences of API requests discovered during the search. Breaking these patterns has a negative impact on the effectiveness of the test case generation process. To address this limitation, this paper proposes a new approach that uses agglomerative hierarchical clustering (AHC) to infer a linkage tree model, which captures, replicates, and preserves these patterns in new test cases. We evaluate our approach, called LT-MOSA, by performing an empirical study on 7 real-world benchmark applications w.r.t. branch coverage and real-fault detection capability. We also compare LT-MOSA with the two existing state-of-the-art white-box techniques (MIO, MOSA) for REST API testing. Our results show that LT-MOSA achieves a statistically significant increase in test target coverage (i.e., lines and branches) compared to MIO and MOSA in 4 and 5 out of 7 applications, respectively. Furthermore, LT-MOSA discovers 27 and 18 unique real-faults that are left undetected by MIO and MOSA, respectively.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/18/2021

Empirical Comparison of Black-box Test Case Generation Tools for RESTful APIs

In literature, we can find research tools to automatically generate test...
research
08/11/2021

Hybrid Multi-level Crossover for Unit Test Case Generation

State-of-the-art search-based approaches for test case generation work a...
research
04/18/2022

Automated Test Generation for REST APIs: No Time to Rest Yet

Modern web services routinely provide REST APIs for clients to access th...
research
10/28/2022

ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolutionary Search

Executing large test suites is time and resource consuming, sometimes im...
research
08/18/2021

Restats: A Test Coverage Tool for RESTful APIs

Test coverage is a standard measure used to evaluate the completeness of...
research
09/08/2023

Testing Real-World Healthcare IoT Application: Experiences and Lessons Learned

Healthcare Internet of Things (IoT) applications require rigorous testin...
research
09/08/2023

Adaptive REST API Testing with Reinforcement Learning

Modern web services increasingly rely on REST APIs. Effectively testing ...

Please sign up or login with your details

Forgot password? Click here to reset