1. Why are there custom variables?
First, let's take a look at how we are going to send multiple requests: the date value of each request is inconvenient to change, so we introduce user-defined variables to improve the reusability of the script.
2. How to reference custom variables?
Refer to the variable in Jmeter like this: ${variable name}
3. How to add: Right-click the thread group-configuration element-user-defined variable
Fill in the corresponding value:
quote:
clear the previous result, click Start, run the test, and view the result
here We have successfully cited it.
So if we want to change the date in the request, we don't have to change the parameters in each request so much, just modify it directly in the user-defined variable. Here we just briefly introduce the usage of user-defined variables. There are many application scenarios. I will talk about it later in actual combat. I hope you will continue to pay attention!
12. User-defined variables of Jmeter request components
Guess you like
Origin blog.csdn.net/weixin_45608577/article/details/108631123
Recommended
Ranking