苏普伊房产转让

发布于 2024-09-05 18:09:57 字数 206 浏览 2 评论 0原文

我正在尝试在soapui中编写并行测试,并且需要在测试步骤之间传输属性

我目前有3个测试步骤:

  1. 执行旧请求
  2. 执行新请求
  3. XML比较groovy脚本中的两个响应

我发现了很多关于使用 xpath 挑选值,但不传递完整响应。

我的问题是如何填写属性传输编辑器中的源框和目标框?

I'm trying to write parallel tests in soapui and need to transfer properties between the test steps

I currently have 3 tests steps:

  1. Execute legacy request
  2. Execute new request
  3. XML diff the two responses in a groovy script

I've found a lot of blogs about picking values out with xpaths, but nothing about passing the full response through.

My questions is how do I fill out the source and target boxes in the property transfer editor?

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

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

发布评论

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

评论(1

迷爱 2024-09-12 18:09:57
  1. 添加“属性”测试步骤。
  2. 为每个响应添加属性。
  3. 在每个请求后定义一个“属性传输”
  4. 将源设置为测试步骤的响应
  5. 将目标设置为步骤 3 中定义的属性
  6. 在 groovy 中访问它们,如下所示:

    def props = testRunner.testCase.getTestStepByName("属性")
    def response1 = props.getPropertyValue("response1")
    def response2 = props.getPropertyValue("response2")
    println 响应1
    println response2

  1. Add a "Properties" test step.
  2. Add properties for each response.
  3. Define a "Property transfer" after each request
  4. Set the source to the response of the test step
  5. Set the target to the property defined in step 3
  6. Access them in groovy like so:

    def props = testRunner.testCase.getTestStepByName("Properties")
    def response1 = props.getPropertyValue("response1")
    def response2 = props.getPropertyValue("response2")
    println response1
    println response2

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