Introduction to JMeter Common Components

A Thread Group

A thread group is a collection of a series of threads, and each thread represents a user who is using the application. In jmeter, each thread means to simulate a real user to initiate a request to the server. In jmeter, the thread group component runs the configuration of the number of threads set by the user, the initialization method, and so on.
For example, if you set the number of threads to 100, then jmeter will create and simulate 100 user requests to the server.
As shown below:
Insert picture description here

Two Samplers (sampler)

Our commonly used jmeter tests include HTTP, FTP, JDBC protocols, and various other supported protocols.
Some protocols commonly used in the Samplers component of jmeter are shown in the following figure:
Insert picture description here

Three Listeners (listeners)

In jmeter, Listeners provide support for execution result generation and display capabilities, and provide tree structure, table, graph and log methods.
Commonly used are aggregate reports, graphic reports, view book results, etc.

图形报告:

Insert picture description here

Aggregation report:
Insert picture description here
view tree results:
Insert picture description here

Four Configuration Elements (configuration elements)

The configuration element contains the default configuration settings of various Samplers under Samplers. If there is a configuration default configuration, the corresponding sampler under Sampler will use the default configuration.
Commonly used configuration originals, as shown below:
Insert picture description here

Five logic controllers (Logic Controller)

Logic controllers include two types of parts. One is the controller used to control the logical sequence of request sent by the sampler node in the test plan. Commonly used are if controllers, switch controllers, runtime controllers, loop controllers, etc. . The other is used to organize the nodes that can control the sampler, such as transaction controllers and throughput controllers.
Insert picture description here

Six pre-processors (Per Processors)

The preprocessor is used for special processing of the upcoming request before the actual request is issued. For example, the HTTP URL rewriting repair symbol can realize URL rewriting. When there is session information such as sessionID in RUL, the actual sessionID of the request can be filled by the processor; such as parameter setting.
Insert picture description here

Seven post processors (Post Processors)

The post processor is used to process the server response obtained after the Sampler sends a request. Generally used to extract specific data in the response (similar to the association concept in the LoadRunner test tool). For example, XPath Extractor can be used to extract data obtained through a given XPath value in response data; regular expression extractor can extract data obtained through regular expressions in response data.
Insert picture description here

Eight assertions (Assertions)

Assertions are used to check whether the corresponding data obtained in the test meets expectations. Assertions are generally used to set checkpoints to ensure whether the data interaction during the performance test is consistent with expectations.
Insert picture description here

Nine timers (Timer)

Timer (Timer) is used to set the waiting time between operations. The waiting time is a commonly used means to control client QPS in performance testing. Similar to the "thinking time" in LoadRunner. JMeter defines different types of Timers such as Bean Shell Timer, Constant Throughput Timer, and Fixed Timer.
Insert picture description here

Ten test fragments (Test Fragment)

The test fragment element is a special thread group on the controller, which is at the same level as the thread group on the test tree. It is different from a thread group because it is not executed unless it is a module controller or is referenced by a controller.
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_47580822/article/details/109566214