问题描述
我没有JMeter的经验.我要做的是同步JMeter线程组.关于如何同步JMeter线程组" ,我想询问有关如何将UserDefined变量"Group1_done==true"
设置为最后一步"的说明.
I am inexperienced in JMeter. What I want to do is to synchronize JMeter Thread groups. With respect to "How to synchronize JMeter Thread groups", I would like to ask an account of how to 'set a UserDefined Variable "Group1_done==true"
as the last step'.
我用初始值定义了用户定义的变量,但是以后没有设置它的值.如何在任何步骤中将其设置为值?
I defined user defined variable with initial value but I did not set it value later. How can I set it value in any step?
推荐答案
即使在HTTP Request Sampler中,您也可以设置变量/属性的值:
You may set value for variable / property even in HTTP Request Sampler:
您的while循环将如下所示:
Your while loop will look like:
Thread Group 1
. . .
. . .
[execute your test logic here]
. . .
HTTP Request
// last step
${__setProperty(group1_done,TRUE,)}
. . .
第三线程组中WHILE循环的条件表达式:
Condition expression for WHILE cycle in 3rd Thread Group:
${__P(group1_done,)} && ${__P(group2_done,)
这篇关于如何通过使用用户定义的变量来同步JMeter线程组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!