13

I am using Jmeter to test my rest services. One rest call returns list of employees in JSON format. I need to parse this response and send it as parameter in next rest call to get employee details.

Is there any way to do so from JMeter tool?

Nouman Bhatti
  • 1,341
  • 6
  • 28
  • 54
Ravi Shekhar
  • 2,633
  • 4
  • 19
  • 19
  • Read about http://jmeter.apache.org/usermanual/component_reference.html#Regular_Expression_Extractor – Nikhil Talreja Jul 02 '14 at 05:52
  • 1
    possible duplicate of [How to use JSON response from server to send POST request with parameters from JSON (jmeter)](http://stackoverflow.com/questions/23246321/how-to-use-json-response-from-server-to-send-post-request-with-parameters-from-j) – olyv Jul 02 '14 at 08:03
  • Basically you use some kind of postprocessor (in your case a json extractor sounds appropriate), then optionally a beanshell postprocessor to take that list of variables and convert them to more familiar variable names. You can then add them to the next request by variable name or via a beanshell preprocessor to loop through them using sampler.addArgument. – user420667 Jan 10 '18 at 21:02

1 Answers1

11

Yes. It can be done in many ways. Please check this link below.

http://eclipsesource.com/blogs/2014/06/12/parsing-json-responses-with-jmeter/

vins
  • 15,030
  • 3
  • 36
  • 47