IJRR

International Journal of Research and Review

| Home | Current Issue | Archive | Instructions to Authors | Journals |

Year: 2025 | Month: June | Volume: 12 | Issue: 6 | Pages: 576-587

DOI: https://doi.org/10.52403/ijrr.20250665

Leveraging Artificial Intelligence for Efficient Test Generation in API Contract Testing

Alex Thomas Thomas1, Santhalakshmi Selvaraj2

1Saransh Inc, New Jersey, USA
2Wipro Limited, New Jersey, USA

Corresponding Author: Alex Thomas Thomas

ABSTRACT

Application Programming Interfaces (APIs) constitute the backbone of modern software architectures, enabling seamless communication and integration of heterogeneous systems. It is crucial to guarantee the reliability and correctness of such interactions, making API contract testing an essential discipline. However, traditional API contract testing approaches have several significant limitations, including manual effort to write test cases, difficulty in keeping the test suites in sync with evolving API specifications, challenges in attaining complete test coverage and creating practical, varied test data. This paper gives a detailed description of how Artificial Intelligence (AI) may be leveraged to overcome these restrictions and significantly enhance the efficiency of test generation in API contract testing. We cover several AI techniques, including machine learning-based approaches to learn from API specs, historical data, and network traffic; the revolutionary potential of Generative AI and Large Language Models (LLMs) to synthesize automated test cases from natural language descriptions and synthetic test data generation; and reinforcement learning-based test optimization. The survey examines the specific benefits of AI, such as automated contract checking, intelligent test data generation, and the possibility of self-healing tests that adapt to API changes. We also cover the significant challenges and determinants concerning AI adoption in this space, including data quality, explainability, integration problems, and the necessity of human-in-the-loop verification. By consolidating results of current research and advances, this paper aims to provide a structured understanding of the state of the art, identify possible future directions, and outline the ethical consequences of applying AI to achieve more efficient, robust, and scalable API contract testing.

Keywords: API Contract Testing, Test Generation, Artificial Intelligence (AI), Machine Learning (ML), Generative AI, Automated Test Case Generation.

[PDF Full Text]