All about SOAP UI and Groovy in it

Posts tagged ‘Property Transfer Step’

Property Transfer in SOAP UI

Property transfers become crucial steps in scenarios where validations are done mostly using derived data.

Lets say after some Groovy script execution we end up setting a property value in Properties step while testing an application’s functionality. And most of the times we would be in need of the obtained result out of that groovy step. As we have it in Properties Step we can access it using Property Expansion technique and also using Property Transfer Step.

Property Transfer Step shall be in between the Properties Step and SOAP request Step, but before placing the Transfer Step have Properties and SOAP request Steps in place. Property Transfer window would something like this:

Property Transfer Step

Property Transfer Step

After creating a new Property Transfer in the above window say ‘RefNumTransfer‘, select source, in this case it would be the ‘Properties’ Step, this inturn provides the list of all properties defined under that Step, select the property you wish to transfer.

Now come to Target block, where we would have our SOAP request to catch the property transfer. Initially declare all the namespaces that your request would use, separating each of them with ‘;’ and then provide the XPath of the target node which should capture the transfered value. 

For example if the SOAP request as is below

SOAP request to catch tranfered Property

SOAP request to catch tranfered Property

then the target block of Property Transfer should contain details like this:

Declaring namespaces and adding target XPath

Declaring namespaces and adding target XPath

Try running the Property Transfer step, you see the ‘Transfer Name’ and ‘Transfered Value’ in the Transfer Log, and also correspondingly that value is reflected in the SOAP request at the target XPath.

 

(Please feel free to get back if u have any trouble…as I am just a mail away…leave otherwise a comment)