2

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."

Here's an image!

2
  • Can you give an example of data you receive and what exactly you need to save and how that is going to be used?
    – Rao
    Commented Mar 27, 2017 at 7:00
  • I'm running a "server-blind" test (aka I do not want the aid of my server-side metrics) against my web-API to see if I can determine server-side delivery-speed from a client. There's a 0.04Kb dictionary from the 1Kb JSON response which I want in a csv field. I posted this to stackoverflow and got an answer re: putting vars into a csv. If you don't think it's a comprehensive answer, I'll hold-off posting it here. Here's the link: stackoverflow.com/questions/43035806/…
    – Rob Truxal
    Commented Mar 27, 2017 at 20:37

1 Answer 1

1

As it has never been added, the answer has been given here: https://stackoverflow.com/questions/43035806/how-do-i-save-jmeter-variables-created-at-runtime-specifically-a-snippet-of-js/43037917#43037917

And see manual on Sample variable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.