Unable to find cookie after redirect
I am testing a rest service which generates a cookie .It is generated as below
Rest service redirects to server 1
Generate a cookie From server 1 and do a redirect to server 2
Now I need to write SAOP UI test case which basically would check the above generated cookie.
I am using the following in my assertion
if (messageExchange.responseHeaders.containsKey('Set-Cookie')) {
log.info "Found Cookie in the response headers"
def cookiez = messageExchange.responseHeaders['Set-Cookie'].value
cookiez.each { cookies ->
log.info cookies.toString()
}
} else {
log.warn "Not Found Cookie in the response headers"
}
it always print Not Found Cookie in the response headers in the log as it doesn't find the coookie.I can see the cookie and its value in http log.is there any configuration i need to do .
Any help would be very welcome.