Forum Discussion

Jmitche11's avatar
Jmitche11
Visitor
9 years ago

Property Transfer to multiple SOAP requests in multiple test case simultaneously?

I have a set of SOAP requests that may exists exist within multiple testcases due their associated namespaces. What I am looking to do is create a Global Properties File which I have done and transfer the corresponding property to all requests simultaneously where the Xpath property exists in each request. From my limited programming experience, I would imagine some sort of loop functionality to loop through each SOAP request and query the Xpath, if the property if found, tranfer the property from the properties file to that Xpath location.

 

example:

When I execute the test cases I want the request to timeout after 90000 milliseconds if it hasn't come back with SOAP response. I see the Timeout property exists for each test step. I am looking to avoid adding 100 propert transfer steps if possible. I am not sure if there is a global setting for timeout of each test step (I saw one for the Test Case, but my test case has  24 test steps in one test case, 25 test steps in another, and 8 in another.

 

another example:

Endpoint is changed which is beyond my control and I have all of the Soap requests associated with each test case. I do not want to lose the layout of the test cases, and would like to grab the new endpoint from the properties file and easily update all test steps to the new endpoint without adding hundreds of property transfer steps.

 

Test Case 1

Soap Req. A

Soap Req. B

Soap Req. C

 

Test Case 2

Soap Req. D

Soap Req. E

Soap Req. F

 

 

Any insight would be most appreciated.

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3

    Yes, that can be achieved using external properties.

     

    SoapUI allows properties file, to be placed under SOAPUI_HOME/bin, with soapui.properties name. When SoapUI is started, properties gets automatically loaded.

     

    TimeOut: Assuming that it is used for the assertions. Define this in above mentioned property file. And use property expansion instead of hard code value where it needs to be used, say ${#Project#TIME_OUT}

     

    Endpoint: Go to service interface (which you see when wsdl is added to the project), go to Service Endpoints tab and define ${#Project#SERVICE1_ENDPOINT} and click on assign to all test cases. Make sure SERVICE1_ENDPOINT is defined in above mentioned property file.

    You may see screen shots 2,3 of Section #4. of http://www.soapui.org/functional-testing/properties/working-with-properties.html