1

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

我目前有 3 个测试步骤:

  1. 执行遗留请求
  2. 执行新请求
  3. XML 区分 groovy 脚本中的两个响应

我发现了很多关于使用 xpaths 挑选值的博客,但没有关于传递完整响应的内容。

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

4

1 回答 1

1
  1. 添加“属性”测试步骤。
  2. 为每个响应添加属性。
  3. 在每个请求之后定义一个“财产转移”
  4. 将源设置为测试步骤的响应
  5. 将目标设置为步骤 3 中定义的属性
  6. 像这样在 groovy 中访问它们:

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

于 2010-06-14T12:46:15.593 回答