RESTful API Automated Test Case Generation

被引:38
|
作者
Arcuri, Andrea [1 ,2 ]
机构
[1] Westerdals Oslo ACT, Oslo, Norway
[2] Univ Luxembourg, SnT, Luxembourg, Luxembourg
关键词
REST; SBSE; SBST; SOA; Microservice; Web Service; Test Generation;
D O I
10.1109/QRS.2017.11
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Nowadays, web services play a major role in the development of enterprise applications. Many such applications are now developed using a service-oriented architecture (SOA), where microservices is one of its most popular kind. A RESTful web service will provide data via an API over the network using HTTP, possibly interacting with databases and other web services. Testing a RESTful API poses challenges, as inputs/outputs are sequences of HTTP requests/responses to a remote server. Many approaches in the literature do black-box testing, as the tested API is a remote service whose code is not available. In this paper, we consider testing from the point of view of the developers, which do have full access to the code that they are writing. Therefore, we propose a fully automated white-box testing approach, where test cases are automatically generated using an evolutionary algorithm. Tests are rewarded based on code coverage and fault finding metrics. We implemented our technique in a tool called EVOMASTER, which is open-source. Experiments on two open-source, yet non-trivial RESTful services and an industrial one, do show that our novel technique did automatically find 38 real bugs in those applications. However, obtained code coverage is lower than the one achieved by the manually written test suites already existing in those services. Research directions on how to further improve such approach are therefore discussed.
引用
收藏
页码:9 / 20
页数:12
相关论文
共 50 条
  • [1] RESTful API Automated Test Case Generation with EvoMaster
    Arcuri, Andrea
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2019, 28 (01)
  • [2] Automated Generation of Test Oracles for RESTful APIs
    Alonso, Juan C.
    PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 1808 - 1810
  • [3] NAUTILUS: Automated RESTful API Vulnerability Detection
    Deng, Gelei
    Zhang, Zhiyi
    Li, Yuekang
    Liu, Yi
    Zhang, Tianwei
    Liu, Yang
    Yu, Guo
    Wang, Dongjin
    PROCEEDINGS OF THE 32ND USENIX SECURITY SYMPOSIUM, 2023, : 5593 - 5609
  • [4] RESTCluster: Automated Crash Clustering for RESTful API
    Liu, Yi
    PROCEEDINGS OF THE 37TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE 2022, 2022,
  • [5] SpyREST in Action: An Automated RESTful API Documentation Tool
    Sohan, S. M.
    Anslow, Craig
    Maurer, Frank
    2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, : 813 - 818
  • [6] Automated RESTful API Service Discovery with Various Interface Features
    Wang, Shuaijun
    Zhou, Yuanyuan
    Ding, Zhijun
    SERVICE-ORIENTED COMPUTING (ICSOC 2022), 2022, 13740 : 54 - 70
  • [7] Efficient penetration of API sequences to test stateful RESTful services
    Yamamoto, Koji
    2021 IEEE INTERNATIONAL CONFERENCE ON WEB SERVICES, ICWS 2021, 2021, : 734 - 740
  • [8] DIRAC RESTful API
    Casajus Ramo, A.
    Graciani Diaz, R.
    Tsaregorodtsev, A.
    INTERNATIONAL CONFERENCE ON COMPUTING IN HIGH ENERGY AND NUCLEAR PHYSICS 2012 (CHEP2012), PTS 1-6, 2012, 396
  • [9] SpyREST: Automated RESTful API Documentation using an HTTP Proxy Server
    Sohan, S. M.
    Anslow, Craig
    Maurer, Frank
    2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, : 271 - 276
  • [10] Resource-based Test Case Generation for RESTful Web Services
    Zhang, Man
    Marculescu, Bogdan
    Arcuri, Andrea
    PROCEEDINGS OF THE 2019 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE (GECCO'19), 2019, : 1426 - 1434