Carving UI Tests to Generate API Tests and API Specification
Rahulkrishna Yandrapally, Saurabh Sinha, Rachel Tzoref-Brill, Ali, Mesbah

TL;DR
This paper introduces a novel UI-driven approach to automatically generate API tests and specifications for web applications, especially when API documentation is missing or inconsistent, improving testing coverage and effectiveness.
Contribution
The authors present a dynamic technique that infers API endpoints from UI navigation and generates API tests and specifications without relying on existing API documentation.
Findings
Achieves 98% precision and 56% recall in inferring API endpoints.
Increases statement coverage by up to 52% when added to existing API test suites.
Enhances branch coverage by up to 99% with the carved API tests.
Abstract
Modern web applications make extensive use of API calls to update the UI state in response to user events or server-side changes. For such applications, API-level testing can play an important role, in-between unit-level testing and UI-level (or end-to-end) testing. Existing API testing tools require API specifications (e.g., OpenAPI), which often may not be available or, when available, be inconsistent with the API implementation, thus limiting the applicability of automated API testing to web applications. In this paper, we present an approach that leverages UI testing to enable API-level testing for web applications. Our technique navigates the web application under test and automatically generates an API-level test suite, along with an OpenAPI specification that describes the application's server-side APIs (for REST-based web applications). A key element of our solution is a dynamic…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Software Engineering Research · Software Testing and Debugging Techniques
