Metamorphic Testing of RESTful Web APIs

被引:95
|
作者
Segura, Sergio [1 ]
Parejo, Jose A. [1 ]
Troya, Javier [1 ]
Ruiz-Cortes, Antonio [1 ]
机构
[1] Univ Seville, Dept Comp Languages & Syst, Seville 41004, Spain
关键词
Metamorphic testing; REST; RESTful Web services; web API; SERVICES;
D O I
10.1109/TSE.2017.2764464
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Web Application Programming Interfaces (APIs) allow systems to interact with each other over the network. Modern Web APIs often adhere to the REST architectural style, being referred to as RESTful Web APIs. RESTful Web APIs are decomposed into multiple resources (e.g., a video in the YouTube API) that clients can manipulate through HTTP interactions. Testing Web APIs is critical but challenging due to the difficulty to assess the correctness of API responses, i.e., the oracle problem. Metamorphic testing alleviates the oracle problem by exploiting relations (so-called metamorphic relations) among multiple executions of the program under test. In this paper, we present a metamorphic testing approach for the detection of faults in RESTful Web APIs. We first propose six abstract relations that capture the shape of many of the metamorphic relations found in RESTful Web APIs, we call these Metamorphic Relation Output Patterns (MROPs). Each MROP can then be instantiated into one or more concrete metamorphic relations. The approach was evaluated using both automatically seeded and real faults in six subject Web APIs. Among other results, we identified 60 metamorphic relations (instances of the proposed MROPs) in the Web APIs of Spotify and YouTube. Each metamorphic relation was implemented using both random and manual test data, running over 4.7K automated tests. As a result, 11 issues were detected (3 in Spotify and 8 in YouTube), 10 of them confirmed by the API developers or reproduced by other users, supporting the effectiveness of the approach.
引用
收藏
页码:1083 / 1099
页数:17
相关论文
共 50 条
  • [21] RESTRuler: Towards Automatically Identifying Violations of RESTful Design Rules in Web APIs
    Bogner, Justus
    Kotstein, Sebastian
    Abajirov, Daniel
    Ernst, Timothy
    Merkel, Manuel
    [J]. IEEE 21ST INTERNATIONAL CONFERENCE ON SOFTWARE ARCHITECTURE, ICSA 2024, 2024, : 123 - 134
  • [22] Do RESTful API design rules have an impact on the understandability of Web APIs?
    Bogner, Justus
    Kotstein, Sebastian
    Pfaff, Timo
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2023, 28 (06)
  • [23] Enhancing White-Box Search-Based Testing of RESTful APIs
    Golmohammadi, Amid
    [J]. 2023 IEEE 34TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING WORKSHOPS, ISSREW, 2023, : 9 - 12
  • [24] Automated Black- and White-Box Testing of RESTful APIs With EvoMaster
    Arcuri, Andrea
    [J]. IEEE SOFTWARE, 2021, 38 (03) : 72 - 78
  • [25] Automated Black-box Testing of Mass Assignment Vulnerabilities in RESTful APIs
    Corradini, Davide
    Pasqua, Michele
    Ceccato, Mariano
    [J]. 2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ICSE, 2023, : 2553 - 2564
  • [26] RestTestGen: An Extensible Framework for Automated Black-box Testing of RESTful APIs
    Corradini, Davide
    Zampieri, Amedeo
    Pasqua, Michele
    Ceccato, Mariano
    [J]. 2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2022), 2022, : 504 - 508
  • [27] JavaScript Instrumentation for Search-Based Software Testing: A Study with RESTful APIs
    Zhang, Man
    Belhadi, Asma
    Arcuri, Andrea
    [J]. Proceedings - 2022 IEEE 15th International Conference on Software Testing, Verification and Validation, ICST 2022, 2022, : 105 - 115
  • [28] Automated black-box testing of nominal and error scenarios in RESTful APIs
    Corradini, Davide
    Zampieri, Amedeo
    Pasqua, Michele
    Viglianisi, Emanuele
    Dallago, Michael
    Ceccato, Mariano
    [J]. SOFTWARE TESTING VERIFICATION & RELIABILITY, 2022, 32 (05):
  • [29] Metamorphic Security Testing for Web Systems
    Mai, Phu X.
    Pastore, Fabrizio
    Goknil, Arda
    Briand, Lionel
    [J]. 2020 IEEE 13TH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VALIDATION AND VERIFICATION (ICST 2020), 2020, : 186 - 197
  • [30] Metamorphic Testing and Web Element Localization
    Le Traon, Yves
    Xie, Tao
    [J]. Software Testing Verification and Reliability, 2024, 34 (07)