JMeter Basics: Scope and execution order of components

Source: Internet
Author: User
Tags config execution valid

Previously introduced JMeter component categories, for beginners, jmeter components are still a lot of, if we follow the meaning of each of the parameters of each component to learn, will undoubtedly reduce the enthusiasm of learning performance testing, even if we are familiar with all components and components on the parameters, We don't know how to combine it into the performance tests we want to describe. On the other hand, we click on the components on each node to show similar or identical menus, and what their hierarchical relationships are. At which level is the component placed to reach our wishes.

How to get started more quickly jmeter, and personally suggest a quick way to learn about the components that a performance test should include and their hierarchical relationships by recording the script.

For recording methods, refer to the JMeter-recording script

as follows, I recorded a script through the Badboy tool (script process: Log in 126 mailbox, send yourself an email, wish yourself a Merry Christmas! and can easily export the script to the JMX format, which is also the format of the JMeter script, so it can be identified and imported by JMeter.

After the script was imported into JMeter, I added two listeners (see the result tree) because I add listeners in a different location and their scope is not the same. The previous one can only monitor the request of the Www.126.com page and listen to all HTTP requests on the latter side.

Scope of a component

Let's discuss the scope of the component. In the chapter on the basic concept of the---jmeter Foundation of JMeter, we introduce 8 types of components that can be executed (test plan and thread group are not components), in which the sampler is a typical component that does not interact with other components, and the logical controller is valid only for the samplers of its child nodes, Other components (config elements, timers, post-processors, assertions, listeners,) need to interact with components such as samplers (sampler).

Configuration components (config elements)

The component affects all components within its scope.

Front handler (per-processors)

The component executes before each sampler component within its scope.

Timer (Timers)

The component is valid for each sampler within its scope

Post-processing program (post-processors)

The component is executed after each sampler component within its scope.

Assertion (assertions)

A component performs a checksum on the results of each sampler component within its scope.

Listeners (Listeners)

The component collects information about each sampler component of its scope and renders it.

In JMeter, the scope of a component is determined by the parent-child relationship of the components in the tree structure of the test plan, and the scope principle is:

The Sampler (sampler) component does not interact with other components, so there is no scope problem.

A logical controller (Logic Controller) component acts only on samplers and logical controllers in its child nodes.

In addition to samplers and logical controller components, the other 6 types of components, if they are child nodes of a sampler, will work on their parent-child nodes.

A 6-class component other than the sampler and the logical controller component, if its parent node is not sampler, its scope is all other descendant nodes (including child nodes, child nodes, and so on) under the parent node of the component.

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.