JMeter JSON Path Extractor accepts the response parameters of the previous request

Source: Internet
Author: User

Recently in the use of JMeter for interface testing, was a problem for a long time, is the second request how to receive the parameters of the last request response, just began to try to use the Internet generally said regular expression, long n times, did not achieve the effect I want, was the whole miserable, so, The first attempt to use the second method, which is jmeter json path Extractor, feels great, in this record

1. Download and install the Json Path Extractor plug-in and unzip it to the appropriate folder in the JMeter installation directory (not in detail here)

2. Add Request A, enter the response server, port number, path, etc. (the path to remember to lose to OH), add the HTTP header manager under a, and then add the Post processor

Because the request response results are as follows

So, write the following format in the JSON Path extractor:

AA is the default value, can be written casually

2. Add request B, add the HTTP header manager under B, because this request is a token in the request header that needs to be used in the previous request response, so in the header manager of request B, enter the

Next run a and b,b to get the token in the a request directly

Thus, the transfer of parameters between different requests is achieved.

Reference articles

Https://www.blazemeter.com/blog/advanced-usage-json-path-extractor-jmeter

Source: http://write.blog.csdn.net/postedit/71291287

JMeter JSON Path Extractor accepts the response parameters of the previous request

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.