![SoapUI Tutorial](/soapui/images/soapui-mini-logo.jpg)
- SoapUI Tutorial
- SoapUI - Home
- Soap Basics
- SOAP - Introduction
- SOAP - Messages
- SOAP - What is REST?
- SoapUI Basics
- SoapUI - Introduction
- SoapUI - Capabilities
- SoapUI - NG Pro
- SoapUI - Installation & Configuration
- SoapUI - WSDL
- SoapUI - Project
- SoapUI - TestSuite
- SoapUI - TestCase
- SoapUI - TestStep
- SoapUI - Request & Response
- SoapUI - Properties
- SoapUI - Property Transfer
- SoapUI - Logs Pane
- SoapUI - Assertions
- SoapUI - Troubleshooting
- SoapUI - Performance Testing
- SoapUI - Load Testing
- SoapUI - RESTful Web Services
- SoapUI - JDBC Connection
- SoapUI - JDBC Property
- SoapUI - JDBC Assertion
- SoapUI Useful Resources
- SoapUI - Quick Guide
- SoapUI - Useful Resources
- SoapUI - Discussion
SoapUI - Property Transfer
Sometimes there is a requirement to extract some value from a response message and include it in the subsequent request(s). In such a case, we need to have a mechanism to retrieve a specified value and transfer it to the other elements of the project. SoapUI supports such functionality through the Property Transfer TestStep.
Adding Property Transfer
Step 1 − Select the TestCase or TestStep, right-click → Add Steps → Property Transfer.
![Adding Property](/soapui/images/adding_property.jpg)
Step 2 − Enter the TestStep name and Click OK.
![Rate Transfer](/soapui/images/rate_transfer.jpg)
Step 3 − RateTransfer step is added and a new wizard will open.
![New Wizard](/soapui/images/new_wizard.jpg)
Step 4 − Click the Adds a new property transfer icon + at the top-left corner in the property transfer window. It will be prompted to enter a name for the transfer. Enter Rate and click OK.
![Rate](/soapui/images/rate.jpg)
Transferring a Property
Once the transfer is created, Source and Target panes need to specify the relevant XPath expressions to extract and replace the property values. In the drop-down box next to Source, various levels of SoapUI projects are listed that can be used as the source of property transfers. By default, the closest TestStep will be shown.
In this case, it is the Request – INR to USD TestStep. The drop-down list next to Property shows the source property which is used in the transfer, which can either be request, response, or service endpoint.
![Transfer Property](/soapui/images/transfer_property.jpg)
Step 1 − Select Response and go to Path language. The user can select XPath, Xquery, or Jason to define the property. In this case, select XPath.
![Path Language](/soapui/images/path_language.jpg)
Step 2 − To get the declaration of source xml, click ns and specify XPath.
Step 3 − Specify the target where the value extracted from the above XPath expression is to be transferred. The target pane is used at the bottom of the property transfer window for that.
Step 4 − Transfer extracted value of ConversionRateResult from response of RequestINRtoUSD step.
Target − Properties
Property − ConversionRate (a new property added, it doesn’t have any value initially).
![Target Property](/soapui/images/target_property.jpg)
Step 5 − Once the test case runs successfully, property “ConversionRate” gets updated based on the response.
Following is the screenshot initially.
![Conversion Rate](/soapui/images/conversion_rate.jpg)
Following is the screenshot after a successful run.
![Successful Run](/soapui/images/successful_run.jpg)
Similarly, Target may be a next Request XML. If Target is SOAP request, we need to provide XPath to identify the target attribute.
To Continue Learning Please Login