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