如何在soapui项目中重用groovy脚本? [英] How reuse groovy scripts in soapui project?

查看:113
本文介绍了如何在soapui项目中重用groovy脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我写了一个groovy函数。是否可以将它存储到soapui项目中的某个测试步骤或另一个地方,并将其包含在其他常规测试步骤中的导入中?

解决方案

SoapUI提供三种选择:


  1. 您可以使用脚本库,您可以将所有脚本存储在单独的目录中,只需调用这些类即可。

  2. 您可以使用运行测试用例步骤,您可以在其中存储您的脚本作为测试,您可以从任何其他测试中调用该脚本。

  3. 您可以将脚本编译为jar,将其放入$ SOAPUI_HOME / bin / ext,然后调用jar中的类。

请注意前两个选项是-Pro only features!


Suppose I write a groovy function. Is it possible to store it to some teststep or another place in soapui project and include it with import in other groovy test steps?

解决方案

SoapUI offers three options:

  1. You can use the script library, where you store all your scripts in a separate directory and just call the classes.
  2. You can use the run testcase step, where you store your script as a test which you can call from any other test.
  3. You can compile your script into a jar, place it in $SOAPUI_HOME/bin/ext, and then call the classes inside your jar.

Note that the first two options are -Pro only features!

这篇关于如何在soapui项目中重用groovy脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆