jmeter configuration original - counter

1. Start jmeter, add a thread group, right-click to add a configuration element - counter

2. Counter page

The initial value, increment, and reference name are required, and the others are optional 

Starting value (starting value): Given the starting value and initial value of the counter, the value will be assigned to the counter at the first iteration 

Increment: The value to add to the counter after each iteration

Maximum: The maximum value of the counter. If it exceeds the maximum value, it will be reset to the initial value (Start). The default maximum value is Long.MAX_VALUE, 2^63-1 (if the pressure test continues, it is recommended not to set it max)

Number format (Number format): optional format, such as 000, formatted as 001, 002; the default format is Long.toString(), but in the default format, it can still be used as a number

Reference Name: used to control the reference to the value in other elements, in the form: reference_name

Track Counter Independently for each User (Track Counter Independently for each User): global counter, if not checked, it is global, for example, user #1 obtains a value of 1, and user #2 obtains a value of 1;

If checked, that is, independent, each user has its own value: for example, user #1 gets a value of 1, and user #2 gets a value of 2.

Reset counter on each Thread Group Iteration (Reset counter on each Thread Group Iteration): optional, only available when the independent tracking counter for each user is checked;

If checked, the value of the counter will be reset every time the thread group iterates, which is useful when the thread group is in a loop controller.

3. References in message body data

Reference format: ${orderNumber}

It can be seen in the actual request that the counter generates the value we need

Guess you like

Origin blog.csdn.net/Jiazengzeng/article/details/121682784