首页> 外文期刊>Empirical Software Engineering >Resource and dependency based test case generation for RESTful Web services
【24h】

Resource and dependency based test case generation for RESTful Web services

机译:基于RESTFUL Web服务的资源和依赖性测试用例

获取原文
           

摘要

Nowadays, RESTful web services are widely used for building enterprise applications. REST is not a protocol, but rather it defines a set of guidelines on how to design APIs to access and manipulate resources using HTTP over a network. In this paper, we propose an enhanced search-based method for automated system test generation for RESTful web services, by exploiting domain knowledge on the handling of HTTP resources. The proposed techniques use domain knowledge specific to RESTful web services and a set of effective templates to structure test actions (i.e., ordered sequences of HTTP calls) within an individual in the evolutionary search. The action templates are developed based on the semantics of HTTP methods and are used to manipulate the web services' resources. In addition, we propose five novel sampling strategies with four sampling methods (i.e., resource-based sampling) for the test cases that can use one or more of these templates. The strategies are further supported with a set of new, specialized mutation operators (i.e., resource-based mutation) in the evolutionary search that take into account the use of these resources in the generated test cases. Moreover, we propose a novel dependency handling to detect possible dependencies among the resources in the tested applications. The resource-based sampling and mutations are then enhanced by exploiting the information of these detected dependencies. To evaluate our approach, we implemented it as an extension to the EvoMaster tool, and conducted an empirical study with two selected baselines on 7 open-source and 12 synthetic RESTful web services. Results show that our novel resource-based approach with dependency handling obtains a significant improvement in performance over the baselines, e.g., up to + 130.7% relative improvement (growing from + 27.9% to + 64.3%) on line coverage.
机译:如今,RESTful Web服务广泛用于构建企业应用程序。 REST不是协议,而是它定义了一组关于如何在网络上使用HTTP访问和操作资源的API的一组指南。在本文中,通过利用关于HTTP资源的处理的域知识来提出基于自动化系统测试生成的基于搜索的自动化系统测试生成方法。所提出的技术使用特定于进化搜索中的特定于RESTful Web服务的域知识和一个有效的模板,以在进化搜索中的个人中构建测试操作(即,HTTP调用的有序序列)。操作模板是基于HTTP方法的语义开发的,用于操作Web服务的资源。此外,我们提出了五种新的采样策略,具有四种采样方法(即,基于资源为基础的采样),用于测试用例,可以使用其中一个或多个模板。进一步支持的策略在进化搜索中进一步支持了一组新的专业突变运算符(即,资源 - 基于资源的突变),以考虑到生成的测试用例中的使用这些资源。此外,我们提出了一种新颖的依赖处理,以检测测试应用中资源中可能的依赖性。然后通过利用这些检测到的依赖项的信息来增强基于资源的采样和突变。为了评估我们的方法,我们将其实施为evomaster工具的扩展,并在7个开源和12个综合性休眠Web服务上进行了两个选定基线的实证研究。结果表明,我们基于新的基于资源的方法,具有依赖处理的性能显着提高,例如,相对改善高达+ 130.7%(从+ 27.9%到+ 64.3%)在线覆盖范围。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号