Test Coverage Criteria for RESTful Web APIs

被引:34
作者
Martin-Lopez, Alberto [1 ]
Segura, Sergio [1 ]
Ruiz-Cortes, Antonio [1 ]
机构
[1] Univ Seville, Seville, Spain
来源
PROCEEDINGS OF THE 10TH ACM SIGSOFT INTERNATIONAL WORKSHOP ON AUTOMATING TEST CASE DESIGN, SELECTION, AND EVALUATION (A-TEST '19) | 2019年
关键词
REST; testing; web services; coverage criteria;
D O I
10.1145/3340433.3342822
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Web APIs following the REST architectural style (so-called RESTful web APIs) have become the de-facto standard for software integration. As RESTful APIs gain momentum, so does the testing of them. However, there is a lack of mechanisms to assess the adequacy of testing approaches in this context, which makes it difficult to automatically measure and compare their effectiveness. In this paper, we first present a set of ten coverage criteria that allow to determine the degree to which a test suite exercises the different inputs (i.e. requests) and outputs (i.e. responses) of a RESTful API. We then arrange the proposed criteria into eight Test Coverage Levels (TCLs), where TCLO represents the weakest coverage level and TCL7 represents the strongest one. This enables the automated assessment and comparison of testing techniques according to the overall coverage and TCL achieved by their generated test suites. Our evaluation results on two open-source APIs with real bugs show that the proposed coverage levels nicely correlate with code coverage and fault detection measurements.
引用
收藏
页码:15 / 21
页数:7
相关论文
共 16 条
  • [1] [Anonymous], 2000, Architectural Styles and the Design of Networkbased Software Architectures, Dissertation, University of California, Irvine
  • [2] RESTful API Automated Test Case Generation with EvoMaster
    Arcuri, Andrea
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2019, 28 (01)
  • [3] Atlidakis V., 2018, REST LER AUTOMATIC I
  • [4] Bai XY, 2005, SOSE 2005: IEEE INTERNATIONAL WORKSHOP ON SERVICE-ORIENTED SYSTEM ENGINEERING, P207
  • [5] WS-TAXI: a WSDL-based testing tool for Web Services
    Bartolini, Cesare
    Bertolino, Antonia
    Marchetti, Eda
    Polini, Andrea
    [J]. SECOND INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION, AND VALIDATION, PROCEEDINGS, 2009, : 326 - +
  • [6] The AETG system: An approach to testing based on combinatorial design
    Cohen, DM
    Dalal, SR
    Fredman, ML
    Patton, GC
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1997, 23 (07) : 437 - 444
  • [7] Automatic Generation of Test Cases for REST APIs: a Specification-Based Approach
    Ed-douibi, Hamza
    Canovas Izquierdo, Javier Luis
    Cabot, Jordi
    [J]. 2018 IEEE 22ND INTERNATIONAL ENTERPRISE DISTRIBUTED OBJECT COMPUTING CONFERENCE (EDOC 2018), 2018, : 181 - 190
  • [8] Visual modeling of RESTful conversations with RESTalk
    Ivanchikj, Ana
    Pautasso, Cesare
    Schreier, Silvia
    [J]. SOFTWARE AND SYSTEMS MODELING, 2018, 17 (03) : 1031 - 1051
  • [9] Jacobson D., 2011, APIs: A Strategy Guide
  • [10] Towards Specification Based Testing for Semantic Web Services
    Jokhio, M. Shaban
    Dobbie, Gillian
    Sun, Jing
    [J]. ASWEC 2009: 20TH AUSTRALIAN SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2009, : 54 - 63