cancel
Showing results for 
Search instead for 
Did you mean: 

Get Data in WS-Addressing Soap Request

Frequent Visitor

Get Data in WS-Addressing Soap Request

Hello fellow testers,

 

I would like to insert a dynamical ip address in the from field of the WS-Addressing for a Soap request.

 

1. I've just received the local ip address through a groovy script

2. I would like to insert the result of this script into the WS-A tab in a Soap request

 

Is this even possible?

 

Kind regards,

 

Martin Hesdahl

1 REPLY 1

Re: Get Data in WS-Addressing Soap Request

Hello martinhesdahl,

 

Yes, it is possible. Use the property expansions for this purpose:

  1. Create the test case custom property.
  2. In the groovy script, assign a dynamic IP to the created property. For example, the following code assigns the value of the ip variable to the dynamicIP property:
    testRunner.testCase.setProperyValue("dynamicIP", ip)
  3. Add the property expansion to the WS-A tab:
    ${#TestCase#dynamicIP}

When you run the test case, Ready! API will substitute the expansion with the value from the Groovy script.

Alexander Linkov
SmartBear Technical Writer
 * Vote for the reply you like.
New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2