Is there a way to reset/clear a COOKIE_
variable each iteration iteration of a thread in a thread group?
"Clear cookies each iteration" option is set in the HTTP Cookie Manager. The problem is that COOKIE_vars
do not get reset when the thread restarts (but the real cookies do, as they should). (This is seen when logging it with sample_variables
option.)
Have tried:
vars.put("COOKIE_var", "null");
works, except that you get a useless extra sample in the log, which is not acceptableSo if there was a way to execute some code without a sample log entry being generated, that would solve it. But haven't found anything to just run some code, nor any way to "cancel" the sample in BeanShell Sampler so that there would be no log of it.
Using an empty If Controller with the following condition works (it does reset the variable and it is executed every iteration without generating a sample):
${__BeanShell(vars.remove("COOKIE_var"); "false";)}
Altho using a controller like this just to run some code seems a bit ugly.
"false"
is in there to return a value that doesn't generate a JS or condition exception.