arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1912.09686cs.SE
收藏

QuickREST:基于属性的OpenAPI-Described RESTful API测试生成

QuickREST: Property-based Test Generation of OpenAPI-Described RESTful APIs

Stefan Karlsson, Adnan Causevic, Daniel Sundmark

摘要:

RESTful API是一种越来越常见的公开软件系统功能的方式,因此,寻找自动测试和验证此类API的方法具有很高的意义。为了降低行业采用的障碍,这些方法需要简单易用。本文介绍了一种探索RESTful API行为的方法。这是通过使用从描述测试中的REST API的OpenAPI文档中生成的基于属性的自动测试来完成的。我们描述了这种方法如何创建工件,这些工件既可以作为基于属性的测试生成器,也可以作为结果验证的来源(即,作为测试神谕)。在工业和开源服务上的实验结果表明,这种方法是一种查找真正故障的低成本方法。此外,它支持通过自动暴露规范和实现的不一致来构建关于被测系统的额外知识。由于测试是从OpenAPI文档中生成的,因此该方法会随着REST API的发展而自动发展测试用例。

英文摘要:

RESTful APIs are an increasingly common way to expose software systems functionality and it is therefore of high interest to find methods to automatically test and verify such APIs. To lower the barrier for industry adoption, such methods needs to be straightforward to use with a low effort. This paper introduces a method to explore the behaviour of a RESTful API. This is done by using automatic property-based tests produced from OpenAPI documents that describe the REST API under test. We describe how this method creates artifacts that can be leveraged both as property-based test generators and as a source of validation for results (i.e., as test oracles). Experimental results, on both industrial and open source services, indicate how this approach is a low effort way of finding real faults. Furthermore, it supports building additional knowledge about the system under test by automatically exposing misalignment of specification and implementation. Since the tests are generated from the OpenAPI document this method automatically evolves test cases as the REST API evolves.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑