当前位置:网站首页>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
边栏推荐
- Several schemes of traffic exposure in kubernetes cluster
- 太上老君的炼丹炉之分布式 Quorum NWR
- Shell命令学习
- Keepalived monitors the process and automatically restarts the service process
- 鸿蒙页面菜单的选择
- LeetCode 每日一题——515. 在每个树行中找最大值
- Zhugeliang vs pangtong, taking distributed Paxos
- 哇哦,好丰富呀。
- Tempest HDMI leak receive 2
- Display purchase Summary - Dell 2705qm BenQ pd2700u
猜你喜欢
![[leetcode] two num · sum of two numbers](/img/9e/79c9deae9f853a265b5b536998b655.png)
[leetcode] two num · sum of two numbers

I have used it for six years!

【UVM入門 ===> Episode_9 】~ 寄存器模型、寄存器模型的集成、寄存器模型的常規方法、寄存器模型的應用場景

Efficient exploration | an application practice of ES geographical location query

为什么要“除夕”,原来是内存爆了!

【UVM入门 ===> Episode_9 】~ 寄存器模型、寄存器模型的集成、寄存器模型的常规方法、寄存器模型的应用场景

Large funds support ecological construction, and Plato farm builds a real meta universe with Dao as its governance

Mysql database import SQL file display garbled code

【批处理DOS-CMD命令-汇总和小结】-CMD窗口的设置与操作命令(cd、title、mode、color、pause、chcp、exit)
![Analysis on the trend of the number of national cinemas, film viewers and average ticket prices in 2021 [figure]](/img/01/594990789cbc1817dbbf61b7dd0c4c.jpg)
Analysis on the trend of the number of national cinemas, film viewers and average ticket prices in 2021 [figure]
随机推荐
Using awk to process input from multiple files
【UVM入門 ===> Episode_9 】~ 寄存器模型、寄存器模型的集成、寄存器模型的常規方法、寄存器模型的應用場景
Editing the date formatting of x-axis tick labels in Matplotlib - editing the date formatting of x-axis tick labels in Matplotlib
Loopholes in the missed scanning system of Lvmeng and its repair scheme
Wow, it's so rich.
Operate cnblogs metaweblog API
Redirect to previous page after login? PHP - Redirecting to previous page after login? PHP
稳压二极管的原理,它有什么作用?
Classic paper in the field of character recognition: aster
Practice of hierarchical management based on kubesphere
线程状态变化涉及哪些常用 API
48 pictures | teach you the performance monitoring, pressure testing and tuning of microservices by hand
[C language] add separator to string
[batch dos-cmd command - summary and summary] - CMD extended command and function (CMD /e:on, CMD /e:off)
48 张图 | 手摸手教你微服务的性能监控、压测和调优
[Yu Yue education] engineering testing technology reference of Wenhua University
Why "New Year's Eve", the original memory burst!
How do I get red green blue (RGB) and alpha back from a UIColor object?
Too beautiful promise because too young
Hanxin's trick: consistent hashing