Carving UI Tests to Generate API Tests and API Specification DOI

Rahulkrishna Yandrapally,

Saurabh Sinha,

Rachel Tzoref-Brill

et al.

Published: May 1, 2023

Modern web applications make extensive use of API calls to update the UI state in response user events or server-side changes. For such applications, API-level testing can play an important role, in-between unit-level and UI-level (or end-to-end) testing. Existing tools require specifications (e.g., OpenAPI), which often may not be available or, when available, inconsistent with implementation, thus limiting applicability automated applications. In this paper, we present approach that leverages enable for Our technique navigates application under test automatically generates suite, along OpenAPI specification describes application's APIs (for REST-based applications). A key element our solution is a dynamic inferring endpoints path parameters via navigation directed probing. We evaluated its accuracy effectiveness "carved" tests. results on seven open-source show achieves 98% precision 56% recall endpoints. The carved tests, added suites generated by two REST tools, increase statement coverage 52% 29% branch 99% 75%, average. main benefits are: (1) it enables cases where existing are inapplicable (2) creates cover code efficiently while exercising as they would invoked from UI, augment suites.

Language: Английский

Leveraging Large Language Models to Improve REST API Testing DOI Creative Commons
Myeongsoo Kim, Tyler Stennett, Dhruv Shah

et al.

Published: April 14, 2024

The widespread adoption of REST APIs, coupled with their growing complexity and size, has led to the need for automated API testing tools. Current tools focus on structured data in specifications but often neglect valuable insights available unstructured natural-language descriptions specifications, which leads suboptimal test coverage. Recently, address this gap, researchers have developed techniques that extract rules from these human-readable query knowledge bases derive meaningful input values. However, are limited types they can prone produce inaccurate results. This paper presents RESTGPT, an innovative approach leverages power intrinsic context-awareness Large Language Models (LLMs) improve testing. RESTGPT takes as specification, extracts machine-interpretable rules, generates example parameter values specification. It then augments original specification Our evaluations indicate outperforms existing both rule extraction value generation. Given promising results, we outline future research directions advancing through LLMs.

Language: Английский

Citations

5

HITA: An Architecture for System-level Testing of Healthcare IoT Applications DOI
Hassan Sartaj, Shaukat Ali, Tao Yue

et al.

Lecture notes in computer science, Journal Year: 2024, Volume and Issue: unknown, P. 451 - 468

Published: Jan. 1, 2024

Language: Английский

Citations

5

Test coverage criteria for RESTful web APIs DOI
Alberto Martin-Lopez, Sergio Segura, Antonio Ruiz–Cortés

et al.

Published: Aug. 8, 2019

Web APIs following the REST architectural style (so-called RESTful web APIs) have become de-facto standard for software integration. As gain momentum, so does testing of them. However, there is a lack mechanisms to assess adequacy approaches in this context, which makes it difficult automatically measure and compare their effectiveness. In paper, we first present set ten coverage criteria that allow determine degree test suite exercises different inputs (i.e. requests) outputs responses) API. We then arrange proposed into eight Test Coverage Levels (TCLs), where TCL0 represents weakest level TCL7 strongest one. This enables automated assessment comparison techniques according overall TCL achieved by generated suites. Our evaluation results on two open-source with real bugs show levels nicely correlate code fault detection measurements.

Language: Английский

Citations

36

Handling SQL Databases in Automated System Test Generation DOI
Andrea Arcuri, Juan Pablo Galeotti

ACM Transactions on Software Engineering and Methodology, Journal Year: 2020, Volume and Issue: 29(4), P. 1 - 31

Published: July 6, 2020

Automated system test generation for web/enterprise systems requires either a sequence of actions on GUI (e.g., clicking HTML links and form buttons) or direct HTTP calls when dealing with web services REST SOAP). When doing white-box testing such systems, their code can be analyzed, the same type heuristics branch distance ) used in search-based unit employed to improve performance. However, do often interact database. To obtain higher coverage find new faults, state databases needs taken into account generating tests. In this work, we present novel heuristic enhance software which takes accessed databases. Furthermore, enable SQL data directly from cases. This is useful it too difficult time consuming generate right events put database state. Also, that are “read-only” under test, actual generated by other services. We implemented our technique as an extension E VO M ASTER , where tests JUnit format. Experiments six RESTful APIs (five open-source one industrial) show techniques significantly (up +16.5%), finding seven faults those systems.

Language: Английский

Citations

36

Carving UI Tests to Generate API Tests and API Specification DOI

Rahulkrishna Yandrapally,

Saurabh Sinha,

Rachel Tzoref-Brill

et al.

Published: May 1, 2023

Modern web applications make extensive use of API calls to update the UI state in response user events or server-side changes. For such applications, API-level testing can play an important role, in-between unit-level and UI-level (or end-to-end) testing. Existing tools require specifications (e.g., OpenAPI), which often may not be available or, when available, inconsistent with implementation, thus limiting applicability automated applications. In this paper, we present approach that leverages enable for Our technique navigates application under test automatically generates suite, along OpenAPI specification describes application's APIs (for REST-based applications). A key element our solution is a dynamic inferring endpoints path parameters via navigation directed probing. We evaluated its accuracy effectiveness "carved" tests. results on seven open-source show achieves 98% precision 56% recall endpoints. The carved tests, added suites generated by two REST tools, increase statement coverage 52% 29% branch 99% 75%, average. main benefits are: (1) it enables cases where existing are inapplicable (2) creates cover code efficiently while exercising as they would invoked from UI, augment suites.

Language: Английский

Citations

12