1

I am using JMeter for some load testing and I have written a postProcessor in Groovy to create an array of strings and place that into a variable from some request data. The issue I am having is I need to then pass that variable into a GraphQL input variable as an array of strings, however I am finding that when I do that using the JMeter variable syntax, it turns the entire variable, brackets and all into a string, instead of it being an array of strings. My question is how can I assign an array of strings to a variable in JMeter and have it stay an array of strings when passed into a GraphQL query variable?

SheWolf
  • 95
  • 6

2 Answers2

1

Turns out there is a bug in JMeter 5.4.1 where any variable that is passed into a GraphQL query through the variable tab will always parse the variable as a string. There is an open PR to address this, but in the meantime, the variable can be added directly to the query inside the query tab instead of using the variable tab to keep the variable type intact.

SheWolf
  • 95
  • 6
0

The bug has been fixed. A new version is available: jmeter 5.5

I just tested it and it works!

LaRusso
  • 1
  • 1