As we know, one domain may how more instance Servers (with different IPs) to handle requests, and all requests are assigned by Load Balance. Now I have a scenario need to get the instance server machine ip (which showed as "Remote Address" property in Chrome Dev Tools View) in SoapUI, how to do this?
Solved! Go to Solution.
I hope this code can help you out:-
def httpResponseHeaders = context.testCase.testSteps["Request_ Name"].testRequest.response.responseHeaders def st = httpResponseHeaders.entrySet().getAt(0).getValue() //In this case Remote address is at 0th position, you can change it based on your header result log.info st
In the screenshot which you have attached earlier, Remote Address Key is there. So, I gave solution based on that. Now, in the response, you are not getting that header key.
HTTP/1.1 200 OK Date: Tue, 21 May 2019 09:47:11 GMT Content-Type: image/gif Content-Length: 43 Connection: close Set-Cookie: _id=abcd; expires=Thu, 20-May-21 09:47:11 GMT; path=/ P3P: policyref="/w3c/p3p.xml", CP="CUR ADM OUR NOR STA NID" Cache-Control: private,no-store,no-cache,must-revalidate,proxy-revalidate,no-transform,max-age=0 Pragma: no-cache Expires: 0 X-Frame-Options: ALLOW-FROM GIF89a
So, How I am gonna check the Remote Address key out of it?