JMeter script to grab the bag in combat

Source: Internet
Author: User
Tags chrome developer chrome developer tools

The following requests for HTTP protocol

Many netizens are still confused how to write JMeter script


Beginners like to use badboy this grab bag tool, it is convenient, can automatically pull the packet request, into the JMX script

However, including other auto-grab tools have drawbacks,

Is that there are too many requests to be caught, and it is not accurate to know that those requests are useful and need one to try,

What's more, the operation is cumbersome, either setting up the agent or running it in its proxy browser ...


Here I introduce to you, several hand-grasping tool, do performance test engineer, need to understand the real request package

An HTTP request, we focus on a few points

1. Path: Remove the domain name and port suffix section, the first page is usually/, other pages/page1/...

2. Type of request: generally get,post

3. Request header (HTTP header): This is more important, where content-type is commonly used by developers, such as Json,xml format data, will have the corresponding content-type type, must be set, Otherwise, the server does not recognize

1, the service side need to return a piece of ordinary text to the client, content-type= "Text/plain"
2, the server needs to return a piece of HTML code to the client, content-type= "text/html"
3, the server needs to return a piece of XML code to the client, content-type= "Text/xml"
4, the server needs to return a piece of JavaScript code to the client,content-type= "text/javascript"
5, the server needs to return a JSON string to the client,content-type= "application/json"

The above type is the general wording, but according to the actual capture package format, the general situation in the first 2 does not need to add Content-type, the following 3 need to add, otherwise the default is normal text, the server will be thrown wrong, can not be processed.

4. Request parameters, very simple is the request parameters, it is easy to identify

The above four kinds of data is necessary to know, in the actual application, the developer may also use other header information, this can only be added according to the actual situation, do not need to pick up all the header information to add

It's enough to return the response correctly.


Chrome developer Tools Grab, for example, other tools like

(Windows system click F12 to bring up the developer tools, select Network, and then start the request, will automatically grab the package)

Grab Bag:

1. PC-side Web mode



2. Mobile-side emulation mode













JMeter script to grab the bag in combat

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.