SoapUI create a template SOAP request - reuse in testcases
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:
Create the content of the template xml into a property file as Name/Value pairs
In the request, use the property(s) at appropriate place using the syntax "${#PROPERTY_NAME}"
In the setup script, load the property file
- You can also store content in an
xml
file. - 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. - The custom variable can be referred as
${#TestCase#templateData}
in theXML request
Please remember that templateData
should be the name of the custom variable of the test case.
精彩评论