MockRest-A Generic Approach for Automated Mock Framework for REST APIs Generation

被引:1
|
作者
Soni, Anshu [1 ]
Ranga, Virender [1 ]
Jadhav, Sandeep [2 ]
机构
[1] Natl Inst Technol, Kurukshetra, Haryana, India
[2] KPIT Technol Ltd, Pune, Maharashtra, India
关键词
MockRest; Mock; REST API; Unit testing; Framework; WireMock; SOAP UI; Jersey; JAX-RS; Tomcat; JAXB;
D O I
10.1007/978-981-15-0146-3_24
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Mock is an object that replicates the behavior of a real object in a disciplined way and improves unit testing. Unit testing is a testing where each individual or component is tested. The purpose of unit testing is to validate each unit of designed software and allow to verify the generated code is working properly, regardless of its dependencies. A system under test has some external dependencies like APIs and creating a mock object based on that kind of dependencies would be efficient rather than generate a test case on the actual instance of the dependencies. A real working system such as banking, autonomous vehicles, online-supply chain businesses, and E-commerce platforms are heavily dependent on a server and facing difficulty while testing with a real server. Mock server helps in testing by simulating the behavior of a real server. Mocks could be used for testing and developing the front-end even when the back-end is not available. The aim of our research work is to propose a generic approach in which we propose a mock framework named Mock-Rest for REST API in Java. The main reason to propose such kind of framework is to get a consistent response while real API is down at the moment by creating a mock of REST API as it allows the developer to stay constructive while the API is being implemented. Application Programming Interface (API) allows interaction between software programs, exchanges their information while REST is an architectural style, and applies to the design of API. A Web API that follows the standards of REST architectural style is a REST API. Based on the description of Web services by its interface, Mock simulates its behavior.
引用
收藏
页码:237 / 255
页数:19
相关论文
共 7 条
  • [1] Automated Test Generation for REST APIs: No Time to Rest Yet
    Kim, Myeongsoo
    Xin, Qi
    Sinha, Saurabh
    Orso, Alessandro
    PROCEEDINGS OF THE 31ST ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2022, 2022, : 289 - 301
  • [2] AGORA: Automated Generation of Test Oracles for REST APIs
    Alonso, Juan C.
    Segura, Sergio
    Ruiz-Cortes, Antonio
    PROCEEDINGS OF THE 32ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2023, 2023, : 1018 - 1030
  • [3] On the Faults Found in REST APIs by Automated Test Generation
    Marculescu, Bogdan
    Zhang, Man
    Arcuri, Andrea
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2022, 31 (03)
  • [4] Automatic Generation of Test Cases for REST APIs: a Specification-Based Approach
    Ed-douibi, Hamza
    Canovas Izquierdo, Javier Luis
    Cabot, Jordi
    2018 IEEE 22ND INTERNATIONAL ENTERPRISE DISTRIBUTED OBJECT COMPUTING CONFERENCE (EDOC 2018), 2018, : 181 - 190
  • [5] GNNBuilder: An Automated Framework for Generic Graph Neural Network Accelerator Generation, Simulation, and Optimization
    Abi-Karam, Stefan
    Hao, Cong
    2023 33RD INTERNATIONAL CONFERENCE ON FIELD-PROGRAMMABLE LOGIC AND APPLICATIONS, FPL, 2023, : 212 - 218
  • [6] An Approach for Creating Framework for Automated Question Generation from Instructional Objective
    Das, Syaamantak
    Chatterjee, Rajeev
    Mandal, Jyotsna Kumar
    PROCEEDINGS OF THE SECOND INTERNATIONAL CONFERENCE ON COMPUTER AND COMMUNICATION TECHNOLOGIES, IC3T 2015, VOL 1, 2016, 379 : 527 - 535
  • [7] Generic ontology and framework for critical scenario description and generation. Applied to evaluation and validation of Automated Vehicle
    Ruchiga, Maria
    Sainct, Remi
    Pierre, Guillaume Saint
    Gruyer, Dominique
    2023 IEEE 26TH INTERNATIONAL CONFERENCE ON INTELLIGENT TRANSPORTATION SYSTEMS, ITSC, 2023, : 783 - 790