.netweb-servicessoapload-testingperformance-testing

Web Service Load Test with dynamic variable in SOAP UI


I need to do a Load Testing on a web service but with changing a field in the SOAP message per each request.

for example:

<typ:storeNum>00001</typ:storeNum> 
<typ:transactionTotal>138</typ:transactionTotal> 
<typ:requestTime>2014-08-19T09:06:00</typ:requestTime>
<typ:ecomTransactionId>920</typ:ecomTransactionId>

in Load test, the body of the soap is submitted as set in the scenarios defined in the web performance test. what if we need to set the field value of ecomTransactionId tag per each request dynamically ?

(I read some articles on MSDN but all refers to extraction rules for the query string or sessions in load testing for a web site pages)

http://msdn.microsoft.com/en-us/library/ff460245(v=vs.110).aspx


Solution

  • The techniques described for use with query strings are the basis of what you need to do.

    You need to get the value of the ID into a context variable, call it something like ecomTransactionId. Having done that then edit the SOAP body via the properties panel of the request. Expect to see a very long string shown in a small area of the panel, so lots of scrolling may be needed. Alter the SOAP body in the property to include the following:

    <typ:ecomTransactionId>{{ecomTransactionId}}</typ:ecomTransactionId>
    

    The MSDN articles discuss extraction rules because that is the commonly used way of finding the required value and saving it into a context parameter.