ASE 2024
Sun 27 October - Fri 1 November 2024 Sacramento, California, United States

This paper introduces API-RBTest, a method for mining constraints from API response bodies and generating test cases to validate these constraints. By leveraging LLMs to understand natural language descriptions in API specifications, API-RBTest generates test cases. Empirical results show API-RBTest achieves an average precision of 94.3% in constraint mining and up to 88.5% in test generation for constraint validation. We also evaluate API-RBTest’s usefulness by leveraging its generated tests to detect the mismatches between API specification and actual data. In 6 services, we report 24 actual faults among 25 mismatches detected by API-RBTest.