0
votes

I want jmeter to send HTTP requests sequentially (because the response depends on earlier requests) reading one line from a CSV file per request. I want to be able to change the CSV file (values and the number of lines) without having to change the test. The problem is that every request takes the first line of the CSV file.

I have tried using: CSV Data Set Config, CSVRead, Loop Controller

I was hoping that a simple structure like this would be enough:

- Thread Group: Number of Threads: 1, Loop Count: Forever
  - HTTP Request
    - CSV Data Set Config: Stop thread on EOF: True (I tried Sharing mode: All threads, Current thread group, Current thread)

I want each request to take a new line from the CSV file, but they all take the first line.

1
Add CSV Data Set Config with HTTP Request under Loop/While controller (Child to While controller). - user7294900
The problem is happening because I'm reading the CSV file value in a JSR223 PreProcessor, if I take read the CSV file value directly in the HTTP request, it works fine. But the value I want to use in the request should be the sum of all values until the current line so I can't read the CSV file value in the request. I could create a second CSV file, but I think there should be a better solution. - Pedram Ghanbarzadegan

1 Answers

0
votes

The test plan structure in the question is correct, no need for while/loop controller. The reason this was happening was an error in my code in the JSR223 PreProcessor.