Reputation: 7
Is there a way to extract from a CSV file two rows (need to give to a sample two rows parameters) and to give a thread and repetitions different rows? I mean first thread first repetition must take first and second row, second thread first iteration must take third and fourth row and so on. But then first user second iteration must take fifth and sixth row and second user second iteration must take 7th and 8th row and so on.
Upvotes: 0
Views: 1312
Reputation: 168002
Go for __CSVRead() function
${__CSVRead(test.csv,0)}
- read first "column" from the test.csv
file${__CSVRead(test.csv,1)}
- read second "column" from the test.csv
file${__CSVRead(test.csv,next)}
- proceed to the next rowSo if you do something like:
${__CSVRead(test.csv,0)} ${__CSVRead(test.csv,next)} ${__CSVRead(test.csv,0)} ${__CSVRead(test.csv,next)}
you will get the required behaviour.
Demo
used components:
${__jm__Thread Group__idx}
- get the current iteration for the Thread GroupMore information: How to Pick Different CSV Files at JMeter Runtime
Upvotes: 1