Jmeter basic (1) Brief Introduction to tools

Source: Internet
Author: User
Tags http cookie

JmeterIntroduction

Jmeter is an open-source testing tool. Although it has many shortcomings compared with LoadRunner, for example, its result analysis capability is not detailed by LoadRunner. It also has many advantages:

  • Open-source: it is an open-source free software. You do not have to pay any fees to use it,
  • Relatively small, it is relatively large than LR (the latest lr11 is nearly 4 GB). It is very small and does not need to be installed, but requires the JDK environment because it is a tool developed using Java.
  • Powerful. jmeter was designed as a simple Web Performance Testing Tool. However, it can now be used to test databases, FTP, LDAP, and WebService after no-segment update and expansion. Because of its open-source nature, you can also expand its functions as needed.

 

Test Plan Components

1. Test Plan): Describes a performance test, including all functions related to this performance test. That is to say, all the content of this performance test is based on a plan.

Right-click the "test plan" pop-up menu:

 

2. threads (users) thread user

Although there are three options for adding a thread group with different names, the interface is identical after creation. The previous version only has the name of a thread group. Now there is one more setup theread group and terdown thread group.

1) setup thread group

A special type of threadgroup that can be used to perform pre-test operations. These threads act like a normal thread group component. The difference is that these types of threads perform regular thread group execution before testing.

2) teardown thread group.

A special type of threadgroup that can be used to perform post-test actions. These threads act like a normal thread group component. The difference is that these types of threads execute regular thread groups after testing.

3) thread group (thread group ).

This is the thread we usually add to run. Generally speaking, a thread group can be considered as a virtual user group. Every thread in the thread group can be considered as a virtual user. The number of threads in the thread group will not change during the test execution.

 

3. Test Fragment)

The test fragment element is a special thread group on the controller. It is in a level with 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.

 

Controller

Jmeter has two types of controllers: The sample and logic controller, which are used to drive a test.

 

4. Sampler)

The sample is the minimum unit for sending requests to the server, recording the response information, and recording the response time in the performance test. jmeter native supports multiple sampler types, for example, HTTP request sampler, FTP request sample, TCP request sample, and JDBC request sampler. Different types of sampler can send different types of requests to the server according to the set parameters.

 

5. Logic Controller)

Logical Controller, including two types of component-less controllers. One is the controller used to control the logical sequence of requests sent by sampler nodes in test plan) controller, switch controller, runtime controller, and loop controller. Another type is used to organize nodes that can control sampler, such as transaction controllers and throughput controllers.

 

6. config Element)

Config element is used to support static data configuration. CSV Data Set config can form a data pool for local data files. If there is no configuration item corresponding to HTTP request sampler and TCP request sampler, the default sampler data can be modified. (For example, HTTP cookie manager can be used to manage HTTP request sampler cookies)

 

7. Timer (timer)

The timer (timer) is used to set the wait time between operations. The wait time is a commonly used hand end for controlling the client QPS in performance testing. Similar to the "thinking time" in LoadRunner ". Jmeter defines different types of timer, such as bean shell timer, constant throughput timer, and fixed timer.

 

8. pre-processor (per processors)

The Preprocessor is used to perform special processing on the request to be sent before the actual request is sent. For example, the http url rewriting fix can be used to rewrite the URL. When rul contains session information such as sessionid, it can be used to fill in the actual sessionid of the request.

 

9. Post Processors)

The post-processor is used to process the server response after the sampler sends a request. It is generally used to extract specific data in the response (similar to the association concept in the LoadRunner test tool ). For example, the XPath extractor can be used to extract the data obtained by the given XPath value in the response data.

 

10. Assertions)

Assertions are used to check whether the data obtained in the test meets expectations. assertions are generally used to set checkpoints to ensure that the data interaction during the performance test is consistent with expectations.

 

11. listener (listener)

This listener is not a component used to listen to system resources. It is a series of components used to process and visualize the test result data. Graph row result, view result tree, and aggregate report. These are all frequently used components.

 

At this point, we have a brief understanding of the basic components of jmeter, and our subsequent performance testing work is to use these components to complete the test task.

 

 

 

 

Jmeter basic (1) Brief Introduction to tools

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.