SoapUI 创建模板 SOAP 请求 - 在测试用例中重用

发布于 2024-11-05 13:31:49 字数 120 浏览 2 评论 0原文

我是 SoapUI 的新手。我正在尝试在 SoapUI 中执行以下操作,但不知道从哪里开始: 1. 使用 SOAP 请求的内容创建 XML 文件 2. 在其他测试用例中重用步骤 1 中创建的文件作为模板

谢谢,

I am new to SoapUI. I am trying to do the following in SoapUI but don't know where to start:
1. Create a XML file with the content of a SOAP request
2. Reuse the file created in step 1 as template in other testcases

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谈场末日恋爱 2024-11-12 13:31:49

我找到了实现此目的的方法:

  1. 将模板 xml 的内容作为名称/值对创建到属性文件中

  2. 在请求中,使用语法“${#PROPERTY_NAME}”在适当的位置使用属性

  3. 在安装脚本中,加载属性文件

I have found a way to achieve this:

  1. Create the content of the template xml into a property file as Name/Value pairs

  2. In the request, use the property(s) at appropriate place using the syntax "${#PROPERTY_NAME}"

  3. In the setup script, load the property file

友欢 2024-11-12 13:31:49
  1. 您还可以将内容存储在 xml 文件中。
  2. 可以通过groovy脚本读取该文件,并将文件中的内容分配给测试用例的Test变量。
  3. 自定义变量可以在 XML 请求中引用为 ${#TestCase#templateData}

请记住,templateData 应该是自定义的名称测试用例的变量。

  1. You can also store content in an xml file.
  2. The file can be read through a groovy script and the content in the file can be assigned to the Test variable of the test case.
  3. The custom variable can be referred as ${#TestCase#templateData} in the XML request

Please remember that templateData should be the name of the custom variable of the test case.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文