开发者

SoapUI create a template SOAP request - reuse in testcases

开发者 https://www.devze.com 2023-03-03 17:30 出处:网络
I am new to开发者_StackOverflow SoapUI. I am trying to do the following in SoapUI but don\'t know where to start:

I am new to开发者_StackOverflow 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,


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


  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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号