Search code examples
testingjmeterperformance-testing

What is the relation between "same user on each thread" and Number of Threads in jmeter?


My understanding is that on checking the box "same user on each thread" the cookies are not cleaned up after each request. But if I specify 200 threads then are all the 200 threads using the same cookies? Ideally I would like the 200 threads to represent different users and therefore use different cookies.


Solution

  • JMeter's cookies and cache, etc. are local to the thread, each thread will have it's own cookies, you can verify it yourself using Debug Sampler and View Results Tree listener combination.

    • If you check the box - the cookies and cache will not be cleared, i.e. on each Thread Group iteration you will get the "same user"
    • If you don't check the box - the cookies and cache will be cleared, i.e. on each Thread Group iteration you will get "returning user" who is already logged in and has full cache of embedded resources