cancel
Showing results for 
Search instead for 
Did you mean: 

Script Assertion To Grab 4 'Set-Cookies' To Set 1 'Cookie' Header In Follow Up Request

SOLVED
Community Hero

Re: Script Assertion To Grab 4 'Set-Cookies' To Set 1 'Cookie' Header In Follow Up Request

@nmrao 

 

this was a total blocker for me - without this I was totally stuffed - i even purposely wasn't checking the forum cos I was that worried about not getting this to work.

 

I cant thank you enough for sorting this for me - really - you've saved my life again.

 

Cheers!

 

rich

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
Community Hero

Re: Script Assertion To Grab 4 'Set-Cookies' To Set 1 'Cookie' Header In Follow Up Request

Hi,

 

I've more evidence I'm a complete idiot.  The script @nmrao  put together for me was to handle the standard handling of Set-Cookie to Cookie handling for requests to a specific host/domain.

 

I repeatedly searched for groovy snippets to help me do this Set-Cookie/Cookie handling before posting my topic on this forum - I never even considered ReadyAPI!/SoapUI already had a function to do this.

 

Yesterday I found this link when I was searching the ReadyAPI!/SoapUI help for something else.

The page indicates there is a single 'Maintain http session' checkbox within the TestCase options that actually does the Set-Cookie/Cookie handling.

 

So - full disclosure @nmrao - I'm sorry for wasting your time - I'm still going to use your code instead cos 1.  it's cool and 2. it's helping me increase my ReadyAPI!/groovy scripting skills - but I needed to highlight to anyone else searching for this functionality that there is an alternative to Rao's code option.

 

Cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
Community Hero

Re: Script Assertion To Grab 4 'Set-Cookies' To Set 1 'Cookie' Header In Follow Up Request

Thank you for your continued search and found that resource.

I am aware of that but not sure of application of that to your context. Any ways, good to re-cap of that. Did you try that?

Again user preferences may have impact on that if connection is closed after each request setting is in place.


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors