When playing back a script NeoLoad is handling the cookie (correctly) but one particular transaction in the application updates the value of the X-AUTH-TOKEN, however this is not being updated in the Cookie that NeoLoad is sending.
Is it possible to remove the X-AUTH-TOKEN value from the Cookie that NeoLoad sends or is it possible to edit the Cookie that NeoLoad sends?
The xauth cookie isn't there because it wasn't part of the original recording, it wasn't needed then so are you sure it is needed in this request now? you can extract the new xauth cookie from the response where it is updated and append the variable to this request header but it may not be required in this request
Hi Neil. No I am not sure the X-Auth is needed.
But I am not adding it. NeoLoad is appending it automatically by itself and I want to make it stop doing that! Or at least update the value it is forcing through.
Currently I am looking at the
context.currentVU.clearCookies();
context.currentVU.setCookieForServer("InventoryServer",cookie);
Options to clear and reset the cookie but those are all returning 403 forbidden.
Ah, I misread it, I thought it was the other way around, this should all be automatic, if Neoload sees a Set Cookie in a response, it will use the value in later request headers, you shouldn't have to worry about updating values
Hi, thanks for the response
I think that's the problem. The application does NOT run Set-Cookie when it updates the token, it returns X-REFRESH-TOKEN in the response. So the Cookie is not being updated and thus NeoLoad is not detecting the update and so keeps reusing the - now obsolete - token.
Is it possible to edit the values of the Cookie?
Yes, you can use a variable extractor to get the cookie value from a response and then the javascript api call you mention above, SetCookieforServer
https://www.neotys.com/documents/doc/neoload/latest/#593.htm#o607
I would check you are getting the correct value and there are no encoded values