I have the following setup:
Thread A
- Http Cookie Manager
- Login Page
Thread B
- Http Cookie Manager
- Page to hit
- Another page to hit
>
I should have been a little more clear in my question, but we got this fixed. Here is our solution:
Http Cookie Manager
Thread A - 1 Thread - 1 Loop Count
- Login Page
- BeanShell PostProcessor
- props.put("MyCookie","${COOKIE_}");
Thread B - 50 Threads - Infinite Loop Count
- BeanShell PreProcessor
- import org.apache.jmeter.protocol.http.control.CookieManager;
import org.apache.jmeter.protocol.http.control.Cookie;
CookieManager manager = sampler.getCookieManager();
Cookie cookie = new Cookie("",props.get("MyCookie"),"","",false,0);
manager.add(cookie);
- Page to hit
- Another page to hit, repeat as needed
Then there is a configuration change for JMeter needed:
Open up the jmeter.properties file and go to the line "CookieManager.save.cookies=false" and make it = true.
This will allow the login cookie in the first thread to be used in the second thread.