I am testing a web application.
In the navigation menu of the main page, when a node is clicked, a javascript function will be called. I look up this function, the page will set document.cookie="current_moduleId=xxxx;path=/" before redirect to the target page.
So how can I set cookie in JMeter for every request?
Create the following pan:
In BeanShell pre processor, put :
Note that using JSR223 PreProcessor + Groovy + Caching will be better for performances