JMeter - Repeating query parameters from array variable

18 Views Asked by At

Hi I'm kinda new to JMeter, and I'm looking to format my HTTP sampler in JMeter to take an array that I computed from a previous sampler with a JSON Extractor to test out another API. For example, I have a variable computed in a previous step:

bookCollection=["acb123","bcd234","cde345"]

And I want to create a sampler to hit an API in this manner using the gathered data:

http://hostname/api/getBooks?id=acb123&id=bcd234&id=cde345

I tried using adding id to the parameter list with ${bookCollection} but this somewhat predictably just put the array in string form, brackets included, in a single id parameter. I don't see anything in the HTTP sampler that can expand an array into multiple repeating query parameters. Any pointers to what JMeter settings or other JMeter test components (samplers/extractors) might work better is greatly appreciated.

0

There are 0 best solutions below