Forum Discussion

magelman's avatar
11 years ago

[LoadUIWeb] Is there a trick to cookie replacers?

Is there a trick or a catch or something not obvious in the cookie replacer setup?  I have tried to set up a simple case where a cookie value is held across 2 requests by setting up a selector for the response on the first page and a replacer on the request tab of the second page. The only attribute on the cookie is path=/.



When I validate the scenario, the cookie value does not appear to be sent.



Is there something that needs to be set in the other request/response fields of Cookie or Set-Cookie?  (That is, the cookie appears there with the original recorded value - but that is not the value I want to use, I want the value from the first request in the run to be used.)



This is really the key feature I need in this tool.  Any ideas?



--Michael



  • you'll want to confirm in the Messages list of the logs that there was a 'Set-cookie' header in the originating response during the simulation (of 1 user by verifying the scenario). also, try using the named variable you saved the cookie value to in the URI of a subsequent request, just to prove that the variable was indeed initialized. variables that are not initialized will cause cookie replacers that use them to be skipped. upon re-run of the test, check what was in the URI of that subsequent request, if indeed the cookie variable was initialized.