You'll need to define the NEW cookie name and value as separate stand-alone vars, or extract them from somewhere earlier in the script:
Then assign them as run-time input parameters.
For example, say we have a POST call that returns a 500 error. When we compare the original recording to a replayed one (which we performed by hitting "Replay Recording":
We see that the cookies differ from the original vs. the new recording. So in order to get the expected 200 code back we need to use the original cookies. So, we copy the original name/value pair of the "Cookie" in the Request Header and store them in user defined variables:
Then we assign them to the Cookie Injector, as explained above. When the load test executes, the "originalASPsessionIDValue" defined above is added as a cookie in the request header for URL 250.
NOTE: if you need to replace a cookie, there is also a "removeCookie" plugin so you can first remove the previous cookie. Otherwise this will happen and the cookie will not be replaced:
Please sign in to leave a comment.