Random selection from CSV file in Jmeter

前端 未结 6 1754
借酒劲吻你
借酒劲吻你 2021-02-07 06:38

I have a very large CSV file (8000+ items) of URLs that I\'m reading with a CSV Data Set Config element. It is populating the path of an HTTP Request sampler and iterating throu

6条回答
  •  清酒与你
    2021-02-07 07:17

    There's no random selection function when reading csv data. The reason is you would need to read the whole file into memory first to do this and that's a bad idea with a load test tool (any load test tool).

    Other commercial tools solve this problem by automatically re-processing the data. In JMeter you can achieve the same manually by simply sorting the data using an arbitrary field. If you sort by, say Surname, then the result is effectively random distribution.

    Note. If you ensure the default All Threads is set for the CSV Data Set Config then the data will be unique in the scope of the JMeter process.

提交回复
热议问题