Test with the AB post method

Source: Internet
Author: User

AB is a common performance testing tool because it supports windows ...

The commonly used commands are ab–c–n–k-r, respectively: The number of analog terminals, the number of packets sent, whether the request is keepalive, ignoring the error, the default is to get the request, that is, the following request can be tested with it:

There's no more talking here.

Second, this is mainly said to test the post method of the request, that is, the browser caught the following:

Need to add two parameters-P and-T, first say-T refers to the requested content type, such as the ' application/x-www-form-urlencoded ' write-T "application/x-www-form-urlencoded",- P followed by the content to post, recorded in text, with my example of this test:

-T parameter will be written as-T "Multipart/form-data; boundary=----------------------------350e95503198 ", but in fact the content of boundary can be defined by itself, as long as it is to the server to identify where the content is

For example, I test is to write-T "Multipart/form-data; boundary=---1234ceshi ".

-P parameter followed by the content, as long as the capture results saved as TXT, such as test.txt, but note if you modify the boundary, then remember also to modify, such as

-----1234ABCD

Content-disposition:form-data; Name= "Midn"

7213c8d95ccc968d28d2d48b0c59a63e

-----1234ABCD-

Note that the last two dashes can not be omitted oh.

The test command line for the example in that article is: ab-n 1-p test.txt-t "multipart/form-data; boundary=---1234abcd "http://172.22.31.45:8080/check_client_need_query.html

Third, through the example of the surface can see that this method is flawed, that is, the content of C.txt is written dead, if the actual test needs to post different data (such as different mid) how to do? There are two ways of doing this:

1. Modify this document before testing by another script or program

2, change LoadRunner ...

Test with the AB post method

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.