web-services - 每个线程具有不同参数的 JMeter 测试计划

标签 web-services rest wcf-data-services jmeter stress-testing

我需要使用 JMeter 测试网络服务。
我已经使用 Thread-group 500 创建了测试计划。
我需要为每个线程传递新的参数值。
我听说过“CSV 数据集配置”,但它不允许我想要的,因为如果我设置“共享模式”=“所有线程”,那么每个线程将尝试从文件中读取每一行 - 我想通过文件中第一个线程的第一个值,第二个线程的第二个值,依此类推。当然,我可以用一行创建 500 个文件,但这种方法既愚蠢又缓慢。
我怎样才能以最好的方式做到这一点?谢谢。

最佳答案

如果我理解正确,您希望 thread1 读取 row1 和 thread2 读取 row2,从而从 CSV 文件中为每个线程提供一个唯一值。这正是“所有线程”所做的。您可以使用调试 Controller 来验证这一点。

http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config

* All threads - (the default) the file is shared between all the threads.
* Current thread group - each file is opened once for each thread group in which the element appears
* Current thread - each file is opened separately for each thread
* Identifier - all threads sharing the same identifier share the same file. So for example if you have 4 thread groups, you could use a common id for two or more of the groups to share the file between them. Or you could use the thread number to share the file between the same thread numbers in different thread groups.

关于web-services - 每个线程具有不同参数的 JMeter 测试计划,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7823285/

相关文章:

web-services - 找不到要下载的 Axis 1.4

java - 在 Java 中调用接受数组或类列表的 Web 服务

wcf - 如何使用 EF 6 为 WCF 数据服务 (odata) 设置配置文件

java - 如何提供 PathParm - jax-rs

java - 获取完整的用户名 siteminder

api - 如何将搜索结果与数据库集成

java - Rest API - Broadleaf Commerce 中的 NullPointerException

php - 将自定义 HTTP header 传递给 RESTful 请求

wpf - 您必须添加对程序集 'Microsoft.Data.Services.Client.Portable...' 和 NUGET 的引用

java - 从 android 2.1 使用 ado.net 数据服务