所以我有以下要求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ns2:GetFacilityRequest xmlns:ns2="http://www.va.gov/VINCIVAFacility">
<RequestMessageID>123</RequestMessageID>
<MessageSentDateTime>2012-07-17T13:04:31.238-06:00</MessageSentDateTime>
<SendingApplication>soapUI</SendingApplication>
<User>
<UserID>123</UserID>
</User>
<FacilityID>${Facilities#FacilityID}</FacilityID>
</ns2:GetFacilityRequest>
</soapenv:Body>
</soapenv:Envelope>
当我运行此测试时,第一个测试始终在FacilityID字段中不发送任何内容并失败。 我该如何解决这个问题?
答案 0 :(得分:0)
$ {Facilities#FacilityID}中的'设施'是什么..对于不同的级别,您可以这样写 $ {[范围] propertyName的[#的xpath表达式]}
其中范围可以是以下文字值之一:
#Project# - references a Project property
#TestSuite# - references a TestSuite property in the containing TestSuite
#TestCase# - references a TestCase property in the containing TestCase
#MockService# - references a MockService property in the containing MockService
#Global# - references a global property (optional)
#System# - references a system property
#Env# - references a environment variable
[TestStep name]# - references a TestStep property within the current TestCase