一句话:提出开源黑盒测试框架 RESTest,支持基于 API 规约的多种测试用例生成与在线持续测试。
RESTful API 在软件集成中至关重要,因此需要充分的测试。然而,现有自动化测试用例生成工具虽展现出潜力,但大多依赖随机输入(即 fuzzing),限制了其适用性。本文提出 RESTest,一个面向 RESTful Web API 的开源黑盒测试框架。RESTest 基于 API 规约,支持使用多种测试技术生成测试用例,包括 fuzzing 和基于约束的测试等;它被设计为可扩展框架,能够方便地加入新的测试用例生成器以及面向不同编程语言的测试写入器。作者在离线和在线两种场景下评估该工具:离线场景表明 RESTest 能高效生成真实的测试用例(测试输入与测试预言),并发现真实 API 中的缺陷;在线场景则展示了其作为持续测试与监控框架的能力。
Testing RESTful APIs thoroughly is critical due to their key role in software integration. Existing tools for the automated generation of test cases in this domain have shown great promise, but their applicability is limited as they mostly rely on random inputs, i.e., fuzzing. In this paper, we present RESTest, an open source black-box testing framework for RESTful web APIs. Based on the API specification, RESTest supports the generation of test cases using different testing techniques such as fuzzing and constraint-based testing, among others. RESTest is developed as a framework and can be easily extended with new test case generators and test writers for different programming languages. We evaluate the tool in two scenarios: offline and online testing. In the former, we show how RESTest can efficiently generate realistic test cases (test inputs and test oracles) that uncover bugs in real-world APIs. In the latter, we show RESTest's capabilities as a continuous testing and monitoring framework. Demo video: https://youtu.be/1f_tjdkaCKo.