Reputation: 351
I'm having a problem with a request i have to make with Jmeter that needs the value of a variable taken with "JSON Extractor" in a previous sample.
Basically if i get the value from a JSON response and store it in a variable with "JSON Extractor", i can only use the variable value in the next sample, but not in other samples.
Here's what im doing:
1) im taking the value of this variables with JSON Extractor from sample number 1:
deviceId
2) im taking the value of this variable with JSON Extractor from sample number 2:
3) Use those values from variables from samples 1 and 2 in the request body in sample 3:
4) I don't get the values from the variables from sample number 1 in request body from sample 3, only the one from sample number 2:
Upvotes: 1
Views: 136
Reputation: 168092
JMeter Variables (as well as functions and properties) are case sensitive so customerId
and customerID
are different beasts. Make sure to use exactly the same value as you define in the "Names of created variables" section and your test should start working as expected (assuming your JSON Path query is correct)
You can check which JMeter Variables are available (along with their values) using Debug Sampler and View Results Tree Listener combination.
Upvotes: 1