Sharing cookie values between thread groups in JMeter

前端 未结 8 2137
暗喜
暗喜 2020-12-08 11:32

I have the following setup:

Thread A
  - Http Cookie Manager
  - Login Page
Thread B
  - Http Cookie Manager
  - Page to hit
  - Another page to hit
         


        
8条回答
  •  萌比男神i
    2020-12-08 12:03

    Rather than having a separate thread group to log users in, you can use a single thread group with a Once Only Controller. Add Samplers under the Once Only Controller to login and get the session cookie (which will of course only run once). From then on the thread group will just run the other samplers passing the session cookie to every request. I had the HTTP Cookie Manager at the Test Plan scope for this.

提交回复
热议问题