Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up a large amount of request data for a jMeter load test

I want to simulate a few hundred http request each with a different token and userId which I have in a database table.

What's the best way of setting up a jMeter load test to do this?

like image 748
blank Avatar asked Dec 20 '25 23:12

blank


1 Answers

You can use JDBC Sampler to extract you data from DB to create a CSV and a JSR223 Sampler using groovy (add groovy-all.jar in jmeter/lib folder) to write the extracted values to a CSV file.

Then in the real plan , use CSV DataSet Config using the generated file.

Depending on how you want to use the dataset, you will play with Sharing mode attribute.

If you want to do both steps within the same plan you can use a Setup thread Group that will contain the JDBC Sampler part to write the CSV File, this will use 1 thread and then the other part in regular Thread Group that will use the number of users you need.

like image 87
UBIK LOAD PACK Avatar answered Dec 22 '25 17:12

UBIK LOAD PACK