[英]How can i pass 'n' number of requests based on value extracted from json path extractor
In Jmeter, I have extracted a value from json. 在Jmeter中,我从json中提取了一个值。 The value is 2. My requirement is I need to send following HTTP samplers.
值是2。我的要求是我需要发送以下HTTP采样器。 Here it is 2. So I need to send the following 2 http requests.
这里是2。所以我需要发送以下2个http请求。 http://IP:PORT/users/0?authSSOId http://IP:PORT/users/1?authSSOId
http:// IP:PORT / users / 0?authSSOId http:// IP:PORT / users / 1?authSSOId
If its 'n' request I need to pass upto 'n' counts in the url How can i Achieve this 如果它的“ n”个请求,我需要在网址中最多传递“ n”个计数,我该如何实现
Given you have this 2
living in a JMeter Variable, ie ${valueFromJson}
假设您有
2
居住在JMeter变量中,即${valueFromJson}
Add While Controller to your Test Plan and put the following expression into the "Condition" input: 将While Controller添加到您的测试计划中,并将以下表达式放入“条件”输入中:
${__javaScript(${counter} < ${valueFromJson},)}
Put a Counter as a child of the While Controller and configure it like: 将计数器作为While控制器的子级,并按以下方式进行配置:
1
1
1
1
counter
counter
The HTTP Request will be executed as many times as the ${valueFromJson}
variable value HTTP请求将与
${valueFromJson}
变量值一样执行多次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.