Automated black-box testing of nominal and error scenarios in RESTful APIs

被引:25
|
作者
Corradini, Davide [1 ]
Zampieri, Amedeo [1 ]
Pasqua, Michele [1 ]
Viglianisi, Emanuele [2 ]
Dallago, Michael [3 ]
Ceccato, Mariano [1 ]
机构
[1] Univ Verona, Dept Comp Sci, Verona, Italy
[2] Bruno Kessler Fdn, Secur & Trust Res Unit, Trento, Italy
[3] Univ Trento, Dept Informat Engn & Comp Sci, Trento, Italy
关键词
automatic test case generation; black-box testing; REST APIs; test oracle;
D O I
10.1002/stvr.1808
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
RESTful APIs (or REST APIs for short) represent a mainstream approach to design and develop web APIs using the REpresentational State Transfer architectural style. Black-box testing, which assumes only the access to the system under test with a specific interface, is the only viable option when white-box testing is impracticable. This is the case for REST APIs: their source code is usually not (or just partially) available, or a white-box analysis across many dynamically allocated distributed components (typical of a micro-services architecture) is computationally challenging. This paper presents RestTestGen, a novel black-box approach to automatically generate test cases for REST APIs, based on their interface definition (an OpenAPI specification). Input values and requests are generated for each operation of the API under test with the twofold objective of testing nominal execution scenarios and error scenarios. Two distinct oracles are deployed to detect when test cases reveal implementation defects. While this approach is mainly targeting the research community, it is also of interest to developers because, as a black-box approach, it is universally applicable across different programming languages, or in the case external (compiled only) libraries are used in a REST API. The validation of our approach has been performed on more than 100 of real-world REST APIs, highlighting the effectiveness of the approach in revealing actual faults in already deployed services.
引用
收藏
页数:33
相关论文
共 48 条
  • [1] RESTTESTGEN: Automated Black-Box Testing of RESTful APIs
    Viglianisi, Emanuele
    Dallago, Michael
    Ceccato, Mariano
    2020 IEEE 13TH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VALIDATION AND VERIFICATION (ICST 2020), 2020, : 142 - 152
  • [2] RESTest: Automated Black-Box Testing of RESTful Web APIs
    Martin-Lopez, Alberto
    Segura, Sergio
    Ruiz-Cortes, Antonio
    ISSTA '21: PROCEEDINGS OF THE 30TH ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, 2021, : 682 - 685
  • [3] Automated Black-box Testing of Mass Assignment Vulnerabilities in RESTful APIs
    Corradini, Davide
    Pasqua, Michele
    Ceccato, Mariano
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ICSE, 2023, : 2553 - 2564
  • [4] RestTestGen: An Extensible Framework for Automated Black-box Testing of RESTful APIs
    Corradini, Davide
    Zampieri, Amedeo
    Pasqua, Michele
    Ceccato, Mariano
    2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2022), 2022, : 504 - 508
  • [5] Automated Black-box Testing of RESTful APIs Using Enhanced Artificial Bee Colony
    Ahmed, Seif
    Hamdy, Abeer
    2023 INTERNATIONAL CONFERENCE ON ADVANCED ENTERPRISE INFORMATION SYSTEM, AEIS 2023, 2023, : 131 - 135
  • [6] RESTest: Black-Box Constraint-Based Testing of RESTful Web APIs
    Martin-Lopez, Alberto
    Segura, Sergio
    Ruiz-Cortes, Antonio
    SERVICE-ORIENTED COMPUTING (ICSOC 2020), 2020, 12571 : 459 - 475
  • [7] Empirical Comparison of Black-box Test Case Generation Tools for RESTful APIs
    Corradini, Davide
    Zampieri, Amedeo
    Pasqua, Michele
    Ceccato, Mariano
    IEEE 21ST INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2021), 2021, : 226 - 236
  • [8] FACTS: Automated Black-Box Testing of FinTech Systems
    Wang, Qingshun
    Gu, Lintao
    Xue, Minhui
    Xu, Lihua
    Niu, Wenyu
    Dou, Liang
    He, Liang
    Xie, Tao
    ESEC/FSE'18: PROCEEDINGS OF THE 2018 26TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2018, : 839 - 844
  • [9] Evolving a Test Oracle in Black-Box Testing
    Wang, Farn
    Wu, Jung-Hsuan
    Huang, Chung-Hao
    Chang, Kai-Hsiang
    FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING, 2011, 6603 : 310 - 325
  • [10] State of the Art: Automated Black-Box Web Application Vulnerability Testing
    Bau, Jason
    Bursztein, Elie
    Gupta, Divij
    Mitchell, John
    2010 IEEE SYMPOSIUM ON SECURITY AND PRIVACY, 2010, : 332 - 345