How to change serviceEndPoint during runtime

Hi,

I want to know if we can change “ServiceEndPoint” during run time?

Example:
I want to run a request GetUsers first pointing to ServiceEndPoint lets say “aaaa” and save the response on file1, in the same test case I want to change the serviceEndPoint to “bbbb” and save the response to file2.

I’ve tried using request.setSoapServiceEndpoint(“https://bbbb.test.com”), but request is still executed via first ServiceEndPoint.

Is this possible?

Thanks in advance

use parameters: define service as:

https://${urlVariable}/rest/of/address

you can even use global variables there and set them in profile


and from script it looks like this:

def rsp01 = WS.sendRequest(findTestObject('Object Repository/IRAMP-RR/RR_REST/GetCreatedCalcs',[('RRID'): requestID_running]))
1 Like