Could you please tell me how to parameterize cookies and I can automate? not manually?

husniyehusniye Posts: 1

There is URL , no login; I type url in chrome , inspect and get cookies find in header. Go back to tool and go request header copy paste cookies manually.
There is a get request in rest API in parasoft tool; it should be cookies (each time new one) on header when I run the test. I do manual. I go to url and get cookies and go back tool , copy-paste in get request header section each time.
Could you please tell me how to parameterize cookies and I can automate? not manually? I think I need to call service extract sessionid/ cookies from request or response then use it subsequent calls. How ??

Tagged:

Answers

  • benken_parasoftbenken_parasoft Posts: 1,018 ✭✭✭
    edited December 2020

    There is URL , no login; I type url in chrome , inspect and get cookies find in header. Go back to tool and go request header copy paste cookies manually.

    Can you use a REST Client to perform the same GET on the URL? If the response contains a Set-Cookie header then SOAtest will automatically store the cookie for you and automatically include a Cookie header in the request of other REST Client tests for that same host. Certain HTTP headers will get added automatically when the test is executed, including Cookie headers, so there is no need to try to set those up manually. To get a new cookie each time this first test is executed, you'll also want to enable the "Reset existing cookies before sending request" option in the test's HTTP transport settings.

Sign In or Register to comment.