Interface Test --jmeter

1, jmeter into command mode: Windows is a Double-click the installation directory under the bin directory of jmeter.bat ( into the English mode ) Double-click ApacheJMeter.jar is to enter the Chinese model , linux is entering the bin directory execute ./jmeter.sh
jmeter -n -t xx.jmeter -l run
2, the three elements of the http protocol:
1) syntax: the data structure and format
2) semantics: each segment has a specific meaning bit
3) timing: send transmission data and speed of the time
Note: no interface You can see catch documentation tool bag
3, why use jmeter parameterized: there are several reasons

1) can streamline operations we tested ; 2) data have uniqueness requirements; 3) some system security mechanisms can not use the same data manipulation ; 4) real simulation of multiple users operating behavior;
4, what is parameterized?
A: The server sends the client data to the previously stored in a parameter of the process.
5, JMeter element has the following four types of test elements:
   1) Test Plan
   2) thread group
   3) assembly
   comprising a member arranged, timer, pre-processor, postprocessor asserted Listener
   4) a controller
   comprising sampler and a logic controller
6, the test plan describes a series of steps JMeter test performed at runtime . A complete test program one or more thread groups , the logic
controller
, sampler , listeners , timers, assertions and configuration elements .
7, control JMeter Thread Group number of threads used to perform the test. To simulate the number of users (called a virtual user) to perform a test, it can
be achieved by modifying the number of threads in the thread group.

8, the functional unit is the smallest element JMeter test, a similar plurality JMeter relative logical functions or
elements related classified as a class, called components, JMeter comprising six components: configuration elements, timer, pre-processor , post-processing
device, asserted listener.
9, such as " HTTP the Request" sampler elements, can achieve the function of transmitting the HTTP request .
10, the can add or modify configuration elements requested content, to achieve a custom request
11, the timer may be such that each sampler within its scope a delay period before execution, to avoid
internal transmission in a short period of time excessive requests to the server, and the server load resulting in excessive
heavy crash.

12, pre-processor it is often used to modify the setting request the sampler prior to operation , or update the response variable is not extracted from the text.
13, the processor is typically used to handle the response data to extract the desired value.
14, the JMeter to test whether they were successful, whether the results expected, can be verified by adding assertion.
15, "Tree View Results" Listener display detailed Sampler information requests and responses.
16, jmeter execution order: Configuration element -> Timer -> preprocessor -> Sampler -> postprocessor -> assertions -> listener
17, http request with the most get and post requests .
18, the so-called parametric, is to send the client to the server data processing procedure previously stored in a parameter.
19, the common parameterization are: configuration elements and built CSV_Data_Set_Config parameterized function , such __CSVRead ()
20 is, parameterized: ① From determining the interface parameter which request parameters need to be parameterized; ② the external test data in a document save , or a csv file type TXT;
③ and adding configure cSV data set Config configuration element ; ④ in the replacement step 3 with variables defined in the data write request dead ; ⑤ the number of threads to the number of use cases or add a loop controller to achieve.
21, using the $ {__ threadNum} obtain the thread number
22, there is a common assertion in response to the assertion and json assertion
23, why should we associate?
The client and server communications, data between a plurality of requests / responses have interdependence . Such a request to return the
some of the need to use the data in response to subsequent requests.

The following are some typical examples: 1), such as the web site for the first session id in subsequent requests will be passed to the site;
2) server generates a token back to the user, in subsequent requests to bring token;. 3) according to the conditions of a query record, select the centralized recording operation (such as deleting a) in the query result
24, the associated definitions: the data returned by the server packet stored to meet the conditions of a process parameter .
25, how to save the data returned from the server la, can be used in the JMeter post-processor to process the associated data, common methods are:
1) the regular expression extractor
2) the JSON extractor

Published 57 original articles · won praise 36 · views 60000 +

Guess you like

Origin blog.csdn.net/hqy1719239337/article/details/104292696