Jmeter - Counter - Track Counter Independently for each User

Earlier we have learn different components of Counter config element of Jmeter and how to use it in your software load test plan with example in THIS ARTICLE. So here we will not discuss all those things and directly focus on usage of "Track Counter Independently for each User" parameter of Counter config element and how it will works in your software load test plan with practical example.

Track Counter Independently for each User
"Track Counter Independently for each User" is checkbox parameter of Counter config element of apache jmeter. Main usage of this parameter is to set independent counter for each thread. Means each new thread will get it's new count if it is checked. Let's take practical example.

I have used 2 different thread groups with same parameter configuration(Number of Threads = 2, Ramp-Up Period = 1, Loop Count = 6) as shown in bellow image.


Counter of Thread Group 1 has Track Counter Independently for each User = checked as shown in bellow image.


But Track Counter Independently for each User = unchecked for Thread Group 2 as shown in bellow image.


All other parameters are same in both thread groups.

I have used counter result reference number in requests's name field as shown in bellow image so that i can see count value of both threads when run test.


Now if you will run above example software test plan, View Results Tree of Thread Group 1 will looks like bellow.


In result you can see that sequence of Count value which is displayed at end of request name is 0001,0001,0002,0002,0003,0003,0001,0001,0002,0002,0003,0003. That means, both threads get it's own value from counter.

View Results Tree of Thread Group 2 will looks like bellow.


In result you can see that sequence of Count value which is displayed at end of request name is 0001,0002,0003,0001,0002,0003,0001,0002,0003,0001,0002,0003. That means both thread are using common shared count value.

This is the main function of "Track Counter Independently for each User" in counter. You can use it in your software load test plan as per your requirement.

No comments:

Post a Comment