karatelabs / karate

Test Automation Made Simple

Home Page:https://karatelabs.github.io/karate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Karate - Setting header for the subsequent calls on the same scenario is not working after updating to 1.x.x

pradeepkumarr23 opened this issue · comments

We have been using Karate 0.9.6 so far and everything was working until we have updated to latest version(1.4.1) and test started breaking, below is an example how the scenarios are created,

  1. Login with credentials
  2. Get the cookie
  3. Make an API call to get the transaction token by setting the cookie as header. Ex
  • header Cookie = cookie (Header with cookie set up property)
  1. Get the transaction token from the response
  2. Make last API call by setting the cookie and token in the header. Ex
  • header Cookie = cookie
  • header txtToken = txtToken

But the last API call has header with new cookie from the responseCookies of the previous call instead of the cookie has been set

Note: the host url on step 3 and 5 are same only path url is different.

I believe the fix that was made here #1526 is forced to use the previous call response cookie rathe which was set as part of the call.

to reopen, please follow this process (exactly as described): https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue