Reputation: 343
I am trying to build a load test (visual studio 2017) that works on a web app that sets a value in the cookie via javascript (client side). For future requests to work, this value needs to be present in the cookie, however because it was set via javascript, this value did not get recorded when building the load test script.
It changes and I know how to the get the needed value into a context parameter.
The problem I have, is;
How do you set a value in the cookie, in a load test in visual studio 2017?
Upvotes: 1
Views: 879
Reputation: 343
After looking into this, it looks like the way to do this is to write a custom request plugin to insert the desired value into the cookie before the request is sent.
From what I have working, it looks like this also needs to be done on each of the requests before it is sent. Its not like it actually sets the cookie to have the desired value. (unless someone knows how?).
Upvotes: 1