The basic concept of jmeter Foundation---jmeter

Source: Internet
Author: User
Tags http cookie

JMeter Description : A very good open-source performance testing tool.

Advantages : You use the use of it will find its heavy advantages, of course, the lack of points will appear.

from the principle of the Performance tool Division :

The JMeter tool and other performance tools are completely consistent in principle, and the tool contains 4 parts:

(1) Load generator: Used to generate load, usually in multi-threaded or multi-process mode to simulate user behavior.

(2) User runner: Typically a script runs the engine, the user runtime attaches the thread or process, and emulates the specified user behavior according to the scripting requirements.

(3) Resource generator: Used to generate resource data for servers and load machines during testing.

(4) Report Builder: Generate reports based on the data alacrity in the test, providing a visual display of the data.

Test Plan Components

test Plan: used to describe a performance test that contains all the functions associated with this performance test. It is said that all the content of this performance test is based on a plan.

Below is a look at what the main functional modules are in the next plan (right-click the test Plan pop-up menu).

Threads (users) thread users

Although there are three options to add a thread group, the name is different and the interface is exactly the same after creation. The previous version has only one thread group name. Now one more setup Theread Group and Terdown Thread Group

1) Setup Thread Group

A special type of threadgroup that can be used to perform a predictive pilot operation. These threads behave exactly like a normal thread-group component. The difference is that these types of threads perform a 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 behave exactly like a normal thread-group component. The difference is that these types of threads perform periodic thread groups after the test is finished.

Maybe you're still not quite sure how they differ from normal thread groups. If you have used JUnit, you will not be unfamiliar with the 2 words of Setup, teardown. It doesn't matter if you use it every time. Familiar with the LoadRunner should know that the LoadRunner script in addition to the action is the real script core content, there is initialization of the "Environment" initialization script and after the completion of the test of the corresponding cleanup information script block.  Then the setup thread group and the teardown thread group refer to these two parts respectively. In essence, they are not different.

3) thread group (thread groups).

This is the thread that we usually add to run. In layman's words, a thread group, which can be viewed as a virtual user group, can be understood as a virtual user by each thread in the thread group. The number of threads contained in a thread group does not change during test execution.

Test fragment (Fragment)

The test fragment is an option added after the 2.5 release.

The test fragment element is a special group of threads on the controller that is at the same level as the thread group on the test tree. It differs from the thread group because it is not executed unless it is a module controller or is referenced by the controller.

Controller

The jmeter has two types of controllers: Sampler (sample) and logic controller, which are used to drive a test with these originals.

Sampling Device (Sampler)

Sampler (sample) is a performance test to send a request to the server, record the response information, record the response time of the smallest unit, JMeter native support many different Sampler, such as HTTP request Sampler, FTP request Sample, TCP Request Sample, JDBC request Sampler, and so on, each of the different types of Sampler can make different types of requests to the server based on the parameters set. (In all Sampler of JMeter, Java request Sampler and BeanShell request Sampler are two special customizable Sampler, which are discussed in more detail later.) )

Logical controllers (Logic Controller)

  Logic controllers, including two types of none, are controllers used to control the logical order of the sampler node sending requests in Test plan, commonly used if (if) controller, switch controller, Runtime controller, loop controllers, etc. The other is used to organize the control of sampler to nodes, such as transaction controller, throughput controller.

Configuration component (config Element)

The configuration element (config Element) is used to provide support for static data configuration. The CSV data Set config can form a data pool for the local data file, while the configuration for the types of HTTP request sampler and TCP Request Sampler can modify the default data for sampler. (for example, HTTP cookie manager can be used to manage HTTP Request Sampler cookies)

Timers (timer)

The timer is used to set the wait time between operations, and the wait time is the hand side of the performance test commonly used to control the client QPS. Similar to the "Think Time" inside the LoadRunner. JMeter defines different types of timers, such as Bean Shell timer, Constant throughput timer, fixed timer, and so on.

Predecessor processor (Per processors)

  For special handling of incoming requests before the actual request is issued. For example, the HTTP URL rewrite modifier can implement URL rewriting, and when there is a SessionID class of session information in Rul, the actual sessionid that make the request can be populated with the processor.

Post Processor (post processors)

  Used to process a server response from a request made by the sampler. Typically used to extract specific data in a response (similar to the concept of association in a LoadRunner test tool). For example, XPath Extractor can be used to extract data from the response data that is obtained from a given XPath value.

Assertion (assertions)

Assertions are used to check if the appropriate data obtained in a test is expected, and assertions are typically used to set checkpoints to ensure that the data interactions in the performance test process are consistent with expectations.

Listener (Listener)

This listener is not a component that listens to system resources. It is a series of components used to process and visualize test results data. Graph row results, view result tree, aggregated report. Are all of the components we often use.

Here, we have a simple understanding of the basic composition of jmeter, our post-order performance testing is to use these components to complete the test task.

Read the link:

"JMeter Basics-Recording Scripts"

----------------------------------------------------------------------------------

I have been busy recently and have worked overtime frequently. There is no time with the group of friends, recently in a few software testing basic books, want to have a feeling from the book, or see better knowledge points, summed up and share with you. Can read the contents of the book to forget, do not know that the selected test book is not good, or because the work pressure is not good. But time one day, January January's past, I even forced myself to have a harvest.

Performance testing has been my learning spindle this year, and other knowledge of learning is laying the groundwork around this spindle. The beginning of this blog is a few of the introduction of the use of JMeter, after more than a year to pick up the enthusiasm for jmeter, share with you.

The basic concept of jmeter Foundation---jmeter

Related Article

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.