I have to select a sample object from a JSON File for randomizing the request body for each request in JMeter
I want to randomize the request body in JMeter from a JSON File. It should be done in the Pre Processor as far as i know but there might be other ways to do it. THe JSON File contains many claim such as { "claim":{ data1:point1, data2:point2 }, "claim":{ data1:point1, data2:point2 } }
So the request body must a randomly selected claim object.
You need to provide a valid JSON file in order to get comprehensive help.
If for some reasons you are not willing to use JSR223 PreProcessor with Groovy for parsing the file and building the proper request body you can do something like:
fileprotocol to read the JSON file from the file system like it's described in How to Extract Data From Files With JMeter article