如何获取Jmeter以将CSV数据用于GET参数? [英] How to get Jmeter to use CSV data for GET parameters?
本文介绍了如何获取Jmeter以将CSV数据用于GET参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在JMETER中实现以下目标
I am wanting to achieve the following in JMETER
- Jmeter加载具有ID号的CSV文件
- Jmeter中的每个用户/线程都会选择一个ID号并将其添加到其HTTP请求中,例如 http:www.testsite.com/test.php?id = x
- 重复步骤2,选择文件中的下一个ID号.
因此,我可以测试我的servlet正在使用连接池执行多个线程.
This is so I can test that my servlet is performing multiple threads with connection pooling.
我尝试在此处手动输入值
I have tried manually entering in values here
但是这不起作用.
架构布局:
谢谢
推荐答案
您可以尝试实现以下架构:
You can try to implement your schema as below:
1..在csv文件中准备测试ID,例如格式如下:
1. Prepare your test-IDs in csv-file, e.g. in the following format:
id1
id2
...
idN
2..使用以下架构:
CSV Data Set Config
Filename: [path to your csv-file with test-IDs]
Variable Names: testID // extracted id can be referred as ${testID}
Recycle on EOF? False
Stop thread on EOF? True
Sharing mode: Current thread // this mode allows EACH thread use ALL values from csv
Thread Group
Number of Threads: N // count of your test-threads (users)
Loop Count: Forever
. . .
HTTP Request // your http call
Server Name or IP: www.testsite.com
Path: /test.php?id=${testID} // use variable with extracted ID
. . .
这篇关于如何获取Jmeter以将CSV数据用于GET参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文