1, under Windows, download JMeter compressed package, unpack and open the bin directory under the Jmeter.bat file, display jmeter Main Page
2. Add "thread Group" and "HTTP request":
3. Add a GET request and a POST request:
(1) Select Get or post at "method"
(2) Enter IP, port, and path
(3) Add parameter in parameters, if parameter is JSON type, edit in body data
(4) Upload file: Select files upload, add file path and parameter name
4. Add a cookie, select the HTTP cookie manager in the "Configure symbol", add the Cookie Manager in the HTTP request is only valid for this request, add to the thread group under the whole thread group request is valid.
5. Viewing results: Add "view result tree" in "listener" to run a request and see "Request" and "response data"
6, add "assertion" in the "Response assertion" to check whether the returned results are correct, "pattern matching rules" generally select "include" Can be
7, parameterization-There are 3 ways:
(1) User-defined variables: Select "User Defined variables" in "Configure Symbols"
For example, define the IP address as a variable:
(2) Function Builder: Select Function Assistant dialog box in options
(3) Get from File: Add "CSV Data set Config" setting in "configuration symbol" to read data in file: Parameter name using Format ${name} or ${phone} form
JMeter HTTP request and parameterization