In literature, we can find research tools to automatically generate test cases for RESTful APIs, addressing the specificity of this particular programming domain. However, no direct comparison of these tools is available to guide developers in deciding which tool best fits their REST API project. In this paper, we present the results of an empirical comparison of automated black-box test case generation approaches for REST APIs. We surveyed the available black-box testing tools that have been proposed in recent literature, finding four usable prototypes: RestTestGen, RESTler, bBOXRT and RESTest. We used these tools to generate test cases for 14 real-world REST services. Then, testing results have been analyzed and compared in terms of robustness (i.e., success rate) and test coverage. Among the considered tools, RESTler appears to be the most solid, able to successfully test all case studies (the other tools experienced crashes). Conversely, test cases generated by RestTestGen scored the highest coverage, suggesting that its testing strategy is the most effective in testing REST APIs.
翻译:在文献中,我们可以找到自动生成更新的API测试案例的研究工具,解决这一特定编程领域的特殊性。然而,无法对这些工具进行直接比较,以指导开发者决定哪个工具最适合他们的REST API项目。在本文中,我们介绍了对REST API自动黑盒测试案例生成方法进行的经验性比较的结果。我们调查了最近文献中提议的可用黑盒测试工具,发现了四种可用的原型:Restestegen、RESTler、BBBOXRT和RESTest。我们利用这些工具为14个真实世界REST服务生成了测试案例。然后,从强健性(即成功率)和测试范围的角度对测试结果进行了分析和比较。在考虑的工具中,RESTler似乎是最可靠的,能够成功测试所有案例研究(其他撞车工具 ) 。相反,RestestotingGen产生的测试案例获得了最高覆盖率,表明其测试策略在测试REST APIs时最为有效。