Contributions
- 1.5KViews0likes1Comment
Re: Unable to find cookie after redirect
I am sorry it didn't help me.If i set followredirect tofalse then the second redirect doesn't happen.But in my case the two redirects should happen . As fot the out put is concerned , the assertion code is unable to find the cookie as there is no cookie. We used postman and encountered the same issue , where the cookie was simply not there.But when we used an interceptor, we were able to see the cookie. Basically SOAUP UI doesn't keeptrack of cookie after two redirects.Cookies are there when "followredirect"is set to false but that stops the second redirect from happening1.5KViews0likes2CommentsUnable to find cookie after redirect
I am testing a rest service which generatesa 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 followingin myassertion 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 printNot 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.1.5KViews0likes4Comments- 1.2KViews0likes0Comments
Re: Unable to retieve Cookie value
Thanks for the quick response My apologies for not being descriptive. I have tworedirects.At very redirect i set a cookie.I am trying to retreive the cookie set in the secondredirect .I can see the cookie generated in the HTTP logs.But in SOAP UI i am unable to retrive cookie as it is always empty. IF i set follow redirect to false I am ableto pull the cookie set in the first redirect but it just stops there as "follow redirect" is set to false. but I would like the two redirects to happen and be able to retrieve the cookie set in the second redirect.I tried in post man with no interceptor and I didn't see the cookie genrated in any of the redirects.But when I enabledthe interceptor I cansee the cookie generated in the secodn interceptor. pls advise1.2KViews0likes2CommentsUnable to retieve Cookie value
I am testing a rest service which generatesa cookie .I am using the followingin myassertion 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 printNot 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.1.2KViews0likes4Comments