[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-489347-105":59,"doc-detail-489347-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","automatic-generation-of-test-cases-for-rest-apis-a-specification-based-approach","Automatic Generation of Test Cases for REST APIs - a Specification-Based Approach","","REST has become a preferred style for designing Web APIs, yet it lacks a standard specification for describing how to build and test them reliably. This work presents an approach for automated REST API testing driven by OpenAPI specifications. The method defines parameter inference rules and a test-suite metamodel to transform OpenAPI definitions into executable test cases. Validation on 91 OpenAPI specifications shows an average coverage of 76.5% and indicates that about 40% of the tested APIs fail, in either definition or implementation.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/automatic-generation-of-test-cases-for-rest-apis-a-specification-based-approach/489347/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/automatic-generation-of-test-cases-for-rest-apis-a-specification-based-approach/489347.png","ImageObject",300,407,{"name":92,"@type":93},"Aria","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-06","2026-10-01",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"Why is REST API testing challenging without standard specifications?","Question",{"text":113,"@type":114},"REST describes architectural principles but does not provide standards for creating and consuming REST APIs, making development, testing, and integration harder. This motivates specification-driven testing using formats like OpenAPI.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"What approach does the paper propose for automated REST API test cases?",{"text":118,"@type":114},"The paper proposes generating specification-based test cases from OpenAPI definitions. It uses parameter inference rules and a TestSuite metamodel, then generates executable code to test the API.",{"name":120,"@type":111,"acceptedAnswer":121},"How effective is the generated test suite in practice?",{"text":122,"@type":114},"Experiments on 91 OpenAPI definitions show the generated test cases cover on average 76.5% of elements in the OpenAPI. The results also reveal that around 40% of tested APIs fail, either in the specification or implementation.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},489347,1791284419,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":52,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145,"preview_page_count":19,"preview_urls":146},2336464648322,"https://ap-avatar.wpscdn.com/avatar/2200025388227c56fec?_k=1778556882303663488","Automatic Generation of Test Cases for REST APIs: a Speciﬁcation-Based Approach  \nHamza Ed-douibi  \nInternet Interdisciplinary Institute (IN3) Universitat Oberta de Catalunya (UOC)  \nBarcelona, Spain [hed-douibi@uoc.edu](hed-douibi@uoc.edu)  \nJavier Luis Cnovas Izquierdo  \nInternet Interdisciplinary Institute (IN3) Universitat Oberta de Catalunya (UOC) Barcelona, Spain [jcanovasi@uoc.edu](jcanovasi@uoc.edu)  \nJordi Cabot  \nICREA  \nUniversitat Oberta de Catalunya (UOC) Barcelona, Spain [jordi.cabot@icrea.cat](jordi.cabot@icrea.cat)  \nAbstract—The REpresentation State Transfer (REST) has gained momentum as the preferred technique to design Web APIs. REST allows building loosely coupled systems by relying on [HTTP](HTTP) and the Web-friendly format JSON. However, REST is not backed by any standard or speciﬁcation to describe how to create/consume REST APIs, thus creating new challenges for their integration, testing and veriﬁcation. To face this situation, several speciﬁcation formats have been proposed (e.g., OpenAPI, RAML, and API Blueprint), which can help automate tasks in REST API development (e.g., testing) and consumption (e.g., SDKs generation).  \nIn this paper we focus on automated REST API testing relying on API speciﬁcations, and particularly the OpenAPI one. We propose an approach to generate speciﬁcation-based test cases for REST APIs to make sure that such APIs meet the requirements deﬁned in their speciﬁcations. We provide a proof-of-concept tool implementing our approach, which we have validated with 91 OpenAPI deﬁnitions. Our experiments show that the generated test cases cover on average 76.5% of the elements included in the OpenAPI deﬁnitions. Furthermore, our experiments also reveal that 40% of the tested APIs fail.  \nIndex Terms—API testing, REST APIs, OpenAPI  \nI. INTRODUCTION  \nThe REpresentation State Transfer (REST) has become the preferred technique when designing Web APIs. REST outlines the architectural principles, properties, and constraints to build Internet-scale distributed hypermedia systems [1] . However REST is a design paradigm and does not rely on any kind of standards to describe REST APIs, which makes REST API development, testing and integration a hard task.  \nThe Web Application Description Language (WADL) [2] was proposed to describe REST APIs but failed to attract adoption due to its complexity and limited support to fully describe REST APIs, thus most of the REST APIs were described using informal text [3] . This situation triggered the creation of other formats, for instance, Swagger, API Blueprint, and RAML, just to cite few, which makes choosing a format or another subjective to the API providers. To face this situation, the OpenAPI Initiative 1 (OAI) was launched with the objective of creating a vendor neutral, portable, and open speciﬁcation for describing REST APIs. OAI has succeeded in attracting major companies (e.g., Google, Microsoft or IBM) and the OpenAPI speciﬁcation has become the  \n1[https://www.openapis.org/](https://www.openapis.org/)  \nchoice of reference, thus increasing its adoption. For instance, [APIs.guru](APIs.guru2)[2](APIs.guru2), a repository of OpenAPI deﬁnitions, lists more than 800 APIs.  \nREST API speciﬁcations can also help automate different developments tasks such as generation of SDKs and API testing. This paper focuses on API testing. In fact, testing Web APIs and specially REST ones is a complex task [4] . Many approaches have proposed speciﬁcation-based test cases generation but mostly for SOAP Web APIs by relying on their Web Services Description Language (WSDL) documents (e.g., [5], [6], [7], [8]) . However, works targeting test cases generation for REST APIs are rather limited (e.g., [9]) . On the other hand, we have witnessed an increasing number of opensource and commercial tools offering automated API testing for different speciﬁcation formats such as Swagger/OpenAPI (e.g., Ready API!3 , Dredd4 , Runscope5 ) and API Blueprint (e.g., Dredd, Api","cbCaiqoFmFORbLxj","https://ap.wps.com/l/cbCaiqoFmFORbLxj","pdf",466766,"English","# Introduction\n## REST and API specification challenge\n## Related work and limitations\n# Proposed approach\n## Parameter inference rules\n## TestSuite metamodel and code generation\n# Evaluation and results\n## Coverage over OpenAPI elements\n## Failure rate of tested APIs","[{\"question\":\"Why is REST API testing challenging without standard specifications?\",\"answer\":\"REST describes architectural principles but does not provide standards for creating and consuming REST APIs, making development, testing, and integration harder. This motivates specification-driven testing using formats like OpenAPI.\"},{\"question\":\"What approach does the paper propose for automated REST API test cases?\",\"answer\":\"The paper proposes generating specification-based test cases from OpenAPI definitions. It uses parameter inference rules and a TestSuite metamodel, then generates executable code to test the API.\"},{\"question\":\"How effective is the generated test suite in practice?\",\"answer\":\"Experiments on 91 OpenAPI definitions show the generated test cases cover on average 76.5% of elements in the OpenAPI. The results also reveal that around 40% of tested APIs fail, either in the specification or implementation.\"}]","Automatic Generation of Test Cases for REST APIs - a Specification-Based Approach | PDF",1790822346,25,[147,151,155,159],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/19a1950c1869f93239969c4cc7b59418.webp",983,1272,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0baed8a44e7510cbeab19d1de034be05.webp",982,1270,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/eec6ecc96685bafa365e7ddd43887845.webp",981,1269,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/dfb88ea86b2c1935e59944a38e4cdaf1.webp",980,1268]