如何从SOAP UI工具的属性传递SOAP请求中的输入值?

问题描述 投票:0回答:1

我正在使用SOAP ui来测试WCF服务。

我想从SOAP UI工具中可用的属性(键值)动态传递输入参数(ExternalReference)的值。

任何人都知道该怎么做吗?

样本XML

<soapenv:Body>
  <mer:GetDocumentSetList>
     <!--Optional:-->
     <mer:DocumentSetListIn>
        <mer1:SearchCriteria>



           <!--Optional:-->
           <mer1:ExternalReference>8B7A2F87-3546-456D-93EF-C8515BF4A14A</mer1:ExternalReference>

           <mer1:ListDateFrom>2020-02-24</mer1:ListDateFrom>
           <!--Optional:-->
           <mer1:ListDateTo>2020-02-25</mer1:ListDateTo>

        </mer1:SearchCriteria>
     </mer:DocumentSetListIn>
  </mer:GetDocumentSetList>

unit-testing wcf soap soapui
1个回答
1
投票

非常简单。在请求XML中,您可以这样指定它:

<ns1:SomeParameter>${#Project#MyPropName}</ns1:SomeParameter>

假定MyPropName是项目级别的属性。如果要使用测试用例级别的属性,请使用

${#TestCase#MyPropName}
© www.soinside.com 2019 - 2024. All rights reserved.