Is there a way to change the json body in vegeta Post request load tests in vegeta.
I want to send a request with a different parameter in the json body for each of the requests. for example if I have
POST https://endpoint.com/createNew
@/targets/data.json
and data.json looks like
{
"id": 1234
}
What is the best way to make it so we have different request data for each of the requests in the attack?
If you have multiple files under
targetsfolder and would like to use them all in your load test I would suggest the following configuration:Install Directory Listing Config plugin using JMeter Plugins Manager
Configure it to point to your
targetsfolder:In your HTTP Request Sampler use __FileToString() function like:
When you run your test it will pick up the next file from
targetsdirectory and use its contents as the request body