当前位置:网站首页>JMeter introduction practice ----- use of global variables and local variables
JMeter introduction practice ----- use of global variables and local variables
2022-06-25 07:31:00 【Programmer base camp】
jmeter An introduction to the practice ------ Use of global and local variables
In order to improve the recording jmeter Script flexibility , You need to use some variables ; For example, in the request header or request body , It is convenient to modify the value .
1. Global variables
props.put(string,string)
props.get(string), The return value is string type , If you want to use its value instead of string Type , You can use functions ${__property( Property name ,,)}, See example
Be careful : here property The first two _, It is easy to make a mistake _

In thread group A Set global variables in name, And let the test plan run each thread independently

In thread group B Set custom local variables in name, The value is a non string form of the upper global variable

Pass local variables as parameters to the sampler

The parameter is thread group A The non string form of the global variable of
2. local variable
vars.put(string,string)
vars.get(string), Returns a string , If you want to get its non string form , use ${ Variable name }



summary : Global variables are available to all thread groups in a test plan , Local variables are used only by the current thread group , Other thread groups are not available
边栏推荐
- What common APIs are involved in thread state changes
- 哇哦,好丰富呀。
- N – simple encoding
- In depth analysis of Apache bookkeeper series: Part 3 - reading principle
- 全局变量&局部变量
- Flexbox on ie11: stretching images for no reason- Flexbox on IE11: image stretched for no reason?
- Tempest HDMI leak receive 2
- Change the current count of auto increment values in MySQL- Changing the current count of an Auto Increment value in MySQL?
- LTpowerCAD II和LTpowerPlanner III
- Zhugeliang vs pangtong, taking distributed Paxos
猜你喜欢

How is the network connected?

有了 MySQL 为什么要用 NoSQL?

几款不错的天气插件

The principle of Zener diode, what is its function?

ES 终于可以搜到”悟空哥“了!

What is the new business model of Taishan crowdfunding in 2022?

线程状态变化涉及哪些常用 API
![[batch dos-cmd command - summary and summary] - add comment command (REM or::)](/img/e9/151885ecd490b0aa83cce0f3a49124.png)
[batch dos-cmd command - summary and summary] - add comment command (REM or::)

The perfect presentation of Dao in the metauniverse, and platofarm creates a farm themed metauniverse

【LeetCode】two num·两数之和
随机推荐
Rotation vector (rotation matrix) and Euler angle
Icon already includes gloss effects
[pytest] modify the logo and parameterization in the allure Report
College entrance examination voluntary filling, why is the major the last consideration?
How to store the directory / hierarchy / tree structure in the database- How to store directory / hierarchy / tree structure in the database?
shell 上下两行合并成一行
Keepalived monitors the process and automatically restarts the service process
[he doesn't mention love, but every word is love]
ES can finally find brother Wukong!
Authentique Photoshop 2022 expérience d'achat partage
Why use NoSQL with MySQL?
Display purchase Summary - Dell 2705qm BenQ pd2700u
What is the new business model of Taishan crowdfunding in 2022?
48 张图 | 手摸手教你微服务的性能监控、压测和调优
How comfortable it is to use Taijiquan to talk about distributed theory!
太美的承诺因为太年轻
用动图讲解分布式 Raft
网络是怎样连接的?
Using awk to process input from multiple files
我与CSDN的一年时光及大学经验分享