Vegetation load testing: different bodies for each POST request in the attack
Is there a way to change the json body in vegetation request load tests in vegetation.
I want to send a request with a different parameter to 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 do this so that we have different request data for each of the requests in the attack?
source to share
If you have multiple files in a folder targets
and would like to use them in test boot mode, I would suggest the following configuration:
-
Install Config Directory List Plugin Using JMeter Plugin Manager
-
Configure it to point to the folder
targets
: -
In the HTTP request, Sampler uses __ FileToString () , like:
${__FileToString(${filename},,)}
-
When you run your test, it will pick up the next file from the directory
targets
and use its contents as the request body
source to share