I'm using JMeter 3.1 to run a http-endpoint test & I need to extract a very small portion of the return JSON I receive.
I'm using the JSON Extractor postprocessor element & JSONPath expressions to find my value. This post does a really good job of explaining how to assign the value I'm looking for to a runtime variable.
However it stops short of explaining how to save said variable to an output file. I can check to make sure that I've pulled the data using an assertion rule; I can even save the true/false value of that check. Saving the variable itself however, seems less straightforward.
I have 3 ideas and am likely going to spend the next few hours exploring them & checking this thread. So,
Will any of these work?:
- Figure out what "Sub Results" means to JMeter and see if I can get my JSON snippet there.
- Make another sampler that (somehow) just reads & returns a variable I pass it at runtime, whenever a thread executes.
- Figure out if "Assertion Results" is capable of saving anything other than "TRUE" or "FALSE."