本文介绍了在jmeter中使用file1.csv和file2.csv进行嵌套循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我使用Apache JMeter,我需要在由csv数据文件驱动的2个嵌套循环中运行函数调用。在如何在jmeter中实现嵌套循环也有类似的问答? long.csv / strong>: 1 2 3 ... 100.000 和 short.csv : a b c $ b b 我需要使用这些文件中的数据运行嵌套循环测试 foreach x from long.csv foreach y from short.cvs call(x,y) 看起来像这样: call(1,a) call(1,b) call 1,c) call(2,a) call(2,b) call(2,c) call 3,b) call(3,c) ... call(100000,a) call(100000,b) call ) 调用可以重新排序,但我需要对每个输入组合进行唯一调用。 建议?解决方案如果您正在寻找详细步骤, 。 http ://www.testautomationguru.com/jmeter-looping-2-csv-files/ I试验&它似乎工作 - 请检查以下快照详细信息。 CSV数据集配置1读取一个csv文件 - var ref名称是'vara'。 它有10行,1-10 CSV数据集配置2读取另一个csv文件,包含3行a,bc - var ref name 'varb'。 允许在EOF上启用ReCycle?设置为True。 线程循环计数用于CSV数据集配置1 \\ 内循环控制器的循环计数用于CSV数据集配置2 I am using Apache JMeter and I need to run function call in 2 nested loops driven by csv datafiles. There is similar Q&A at How to implement nested loop in jmeter? but it's not based on datafiles.I have 2 files:long.csv:123...100.000and short.csv:abcI need to run nested loop test with data from those filesforeach x from long.csv foreach y from short.cvs call(x,y)and I want the calls look like this:call(1,a)call(1,b)call(1,c)call(2,a)call(2,b)call(2,c)call(3,a)call(3,b)call(3,c)...call(100000,a)call(100000,b)call(100000,c)The calls may be reordered, but I need unique call on every combination of inputs.Suggestions? 解决方案 If you are looking for detailed steps, please check here.http://www.testautomationguru.com/jmeter-looping-2-csv-files/I tried & it seems to work - Please check below snapshot for details.CSV Data set Config 1 reads a csv file - the var ref name is 'vara'.it has 10 rows , 1-10CSV Data set Config 2 reads another csv file , contains 3 rows a, b c - and the var ref name is 'varb'. 'Allow ReCycle on EOF?' is set to True.Thread Loop Count is for CSV Data set Config 1Inner Loop Controller's loop count is for CSV Data set Config 2 这篇关于在jmeter中使用file1.csv和file2.csv进行嵌套循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-19 12:50