Connecting Web Services in SOAP UI – To test a Complete Scenario
For Testing a complete scenario, it may be required to connect web services which can be done with Property Transfer feature in SOAP UI.
Property Transfer is a Test Step in SOAP UI which is used to transfer properties between Test Steps and their containing Test Case, Test Suite and Project.
It is very useful when we need to transfer values from one SOAP Request (XML) to another Soap Request (like Session Id) or from one SOAP Response to another Soap Request (like Order No.)
Let see how it’s done in SOAP UI:
To pass one property value from on service (Request /Response) to another service (Request /Response)Property Transfer is used.
1. ) Add Property Transfer as a step in the test case as shown below.
2.) Property Transfer Step is added
3.) Open Property Transfer Window by double clicking on Property Transfer Step. The below window will be opened.
4.) Add Property which needs to be transferred - like Session id from one SOAP Request to another SOAP Request. Also ,mention the Source and Target Request and the property as shown in the below image.
NOTE :In SOAPUI Pro, wizard will be opening to generate the XPath of the value to be transferred for source and target from XML but in SOAP UI (simple) this feature is not there.
So we have to add the XPath of the value manually after declaring the namespace(as shown below)
We can run this step individually to test whether the value is getting transferred properly or not. (As shown below)
So the above Property Transfer will:
Transfer the Session ID from Test Request 1 –Request to Test Request 2 –Request.
We can transfer any value from Test Request 1 –Response to Test Request 2 –Request.