'Jmeter - How to read csv in such a fashion that read 5 rows in first iteration and another 5 rows in second iteration?
I need to use data from csv in such a fashion that for first iteration read some of the rows and in other iteration read the remaining rows.
No. of rows per iteration might be fixed or dynamic.
Don't want to read all the rows using loop.
Solution 1:[1]
Take a look at the following options:
__CSVRead() function which proceeds to the next line when you specify
nextas the column number__StringFromFile() function which reads the next line from the file each time it's being called
__groovy() function which allows executing arbitrary Groovy code so you can read
- first line of the file as
new File('test.csv').readLines().get(0) - second line as
new File('test.csv').readLines().get(1) - etc.
- first line of the file as
More information on JMeter Functions concept: Apache JMeter Functions - An Introduction
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dmitri T |
