__V 用于 jmeter 中的 属性 变量
__V for property variable in jmeter
我有 JMX 结构,例如,
ThreadGroup-1
- 设置propertyVariable-Content_0、Content_1、Content_3等
ThreadGroup-2
- 循环控制器
Counter-counterNum
- HTTPRequest--使用 PropertyValue 作为 ${__V(__P(Content)_${CounterNum})}
以上变量未获取值。
因为它有 属性 变量,所以卡住了如何在这种情况下使用 __V。
谁能解释一下当我们有 属性 变量时如何使用 __V。
你不需要__V() function here, you can access property value using __P() function直接点赞:
${__P(Content_${CounterNum},)}
演示:
如果出现故障,请仔细检查您是否真的使用Debug Sampler and View Results Tree侦听器组合
设置属性值
你需要用到这个
${__V(MainVriableName_${CounterNo})}
1) 添加循环控制器
2) Under Loop Counter -> Add Counter (Starting value= 1, Increment = 1, Maximun value = ${MainVriableName_matchNr} 和 Exported Variable Name = CounterNo
3) 在下面的请求中使用 ${__V(MainVriableName_${CounterNo})}
这很好用。
我有 JMX 结构,例如,
ThreadGroup-1
- 设置propertyVariable-Content_0、Content_1、Content_3等
ThreadGroup-2
- 循环控制器
Counter-counterNum
- HTTPRequest--使用 PropertyValue 作为 ${__V(__P(Content)_${CounterNum})}
以上变量未获取值。
因为它有 属性 变量,所以卡住了如何在这种情况下使用 __V。
谁能解释一下当我们有 属性 变量时如何使用 __V。
你不需要__V() function here, you can access property value using __P() function直接点赞:
${__P(Content_${CounterNum},)}
演示:
如果出现故障,请仔细检查您是否真的使用Debug Sampler and View Results Tree侦听器组合
设置属性值你需要用到这个
${__V(MainVriableName_${CounterNo})}
1) 添加循环控制器
2) Under Loop Counter -> Add Counter (Starting value= 1, Increment = 1, Maximun value = ${MainVriableName_matchNr} 和 Exported Variable Name = CounterNo
3) 在下面的请求中使用 ${__V(MainVriableName_${CounterNo})}
这很好用。