简体   繁体   English

在JMeter HTTP请求中连续更改参数值

[英]Consecutively changed value of parameter in JMeter HTTP Request

I want to create a test plan for testing a given web, using JMeter. 我想使用JMeter创建测试给定Web的测试计划。 There are two parameters in this test: X and Y. 该测试有两个参数:X和Y.

Each loop, I give a random number from 0 to 50 ${__Random(0,50,)} as parameter X, and then give Y the values as follows: Y=[0,10,20...50] consecutively (X remains the same). 每个循环,我给出一个0到50 ${__Random(0,50,)}的随机数作为参数X,然后给Y Y=[0,10,20...50]如下: Y=[0,10,20...50]连续( X保持不变)。

I used a counter here, but I got a different X each time. 我在这里使用了一个计数器,但每次都有一个不同的X. And user parameters don't seem suitable for this problem. 并且用户参数似乎不适合此问题。 Or maybe I just don't know how to use them correctly. 或者我可能只是不知道如何正确使用它们。

Are there any methods to solve this problem? 有什么方法可以解决这个问题吗? I'm new to this tool, so it may be something basic. 我是这个工具的新手,所以它可能是基本的东西。

Thanks in advance:D 提前致谢

Here is the screenshot of my test plan: 这是我的测试计划的屏幕截图: 在此输入图像描述

Add a csv data set as child of test plan and put in File you will reference from it 添加一个csv数据集作为测试计划的子项,并放入文件,您将从中引用它

 0
 10
 20
 30
 40
 50

Set y as var And use ${y} as Y value 将y设置为var并使用$ {y}作为Y值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在JMeter中使用HTTP请求发送动态参数值 - Send dynamic parameter value with HTTP Request in JMeter jmeter中的HTTP请求中缺少参数名称? - Parameter name is missing in HTTP Request in jmeter? 如何获取JMeter HTTP请求的参数名称? - How to get parameter name for the JMeter HTTP request? 如何更改 JMeter“Http 请求”中的参数值,用于控制 state 的带有“标题”文本的复选框 - How to Change the Parameter Value in JMeter "Http Request" for a checkbox with "title" text controlling the state 在 Jmeter http 请求中循环一个 static 值 - Loop a static value in Jmeter http request 无法将从 Json 提取器提取的值作为另一个 http 请求的主体参数发送到 jmeter 的不同线程中 - Unable to send the value extracted from Json extractor as a body parameter for another http request in different thread in jmeter JMeter:如何在HTTP请求中捕获动态请求参数值 - JMeter: How to capture dynamic request parameter values in HTTP Request JMETER中对另一个HTTP请求的HTTP响应的一个参数 - One Parameter of HTTP Response to Another HTTP request in JMETER 在jmeter中变量值未在http请求中正确递增 - in jmeter variable value is not incrementing correctly in http request 如何在 JMeter 请求中添加计算值作为参数? - How to add a calculated value as parameter in JMeter request?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM