当前位置:网站首页>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
边栏推荐
- 我们不一样
- Kube scheduler source code analysis (1) - initialization and startup analysis
- Harmony美食菜单界面
- 哇哦,好丰富呀。
- 诸葛亮 VS 庞统,拿下分布式 Paxos
- Escape analysis of 982 golang
- Don't you know the evolution process and principle of such a comprehensive redis cluster model?
- Rotation vector (rotation matrix) and Euler angle
- Ppt template of small fresh open class education courseware
- Icon already includes gloss effects
猜你喜欢

Authentique Photoshop 2022 expérience d'achat partage

Sqlmap advanced use – cookies

Practice of hierarchical management based on kubesphere
![[batch dos-cmd command - summary and summary] - external command -cmd download command and packet capture command (WGet)](/img/00/5a5b081b78ad6a6c1c3a3c847dd315.png)
[batch dos-cmd command - summary and summary] - external command -cmd download command and packet capture command (WGet)

Cocos learning diary 3 - API acquisition nodes and components
![[pytest] modify the logo and parameterization in the allure Report](/img/c0/93519da008ec137c447bb11aa7b73e.png)
[pytest] modify the logo and parameterization in the allure Report

In depth analysis of Apache bookkeeper series: Part 3 - reading principle
![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]

LTpowerCAD II和LTpowerPlanner III

Display purchase Summary - Dell 2705qm BenQ pd2700u
随机推荐
College entrance examination voluntary filling, why is the major the last consideration?
【批处理DOS-CMD命令-汇总和小结】-cmd扩展命令、扩展功能(cmd /e:on、cmd /e:off)
Event registration | Apache pulsar x kubesphere online meetup is coming
Alphassl wildcard certificate for one month
高数基础_函数的奇偶性
【批處理DOS-CMD命令-匯總和小結】-cmd擴展命令、擴展功能(cmd /e:on、cmd /e:off)
Advanced mathematics foundation_ Parity of functions
[Batch dos - cmd Command - Summary and Summary] - cmd extension Command, extension Function (CMD / E: on, CMD / E: off)
哇哦,好丰富呀。
One year's time and University experience sharing with CSDN
Changing the background color of tab bar - changing the background color of tab bar
Common functions of OrCAD schematic
Let's talk about MCU crash caused by hardware problems
48 张图 | 手摸手教你微服务的性能监控、压测和调优
线程状态变化涉及哪些常用 API
[batch dos-cmd command - summary and summary] - CMD extended command and function (CMD /e:on, CMD /e:off)
48 pictures | teach you the performance monitoring, pressure testing and tuning of microservices by hand
单片机IO详解(上拉 下拉 准双向 输入 输出 推挽 开漏)
The perfect presentation of Dao in the metauniverse, and platofarm creates a farm themed metauniverse
Google extender address