我需要使用 JMeter 测试网络服务。
我已经使用线程组 500 创建了测试计划。
我需要为每个线程传递新的参数值。
我听说过“CSV 数据集配置”,但它不允许我想要的,因为如果我设置“共享模式”=“所有线程”,那么每个线程将尝试从文件的每一行读取 - 我想通过文件中的第一个值用于第一个线程,第二个值用于第二个线程,依此类推。当然,我可以用一行创建 500 个文件,但这种方法既愚蠢又缓慢。
我怎样才能以最好的方式做到这一点?谢谢。
如果我理解正确的话,您希望线程 1 读取 row1,线程 2 读取 row2,从而为每个线程提供 CSV 文件中的唯一值。这正是“ALL THREADS”的作用。您可以使用调试控制器来验证这一点。
http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config 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.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)