JMeter scope of elements and order of execution

Sampler element is typically no interaction with other elements, the logic controller sampler effective only child nodes, and other elements (config elements, timers, post-processors, assertions, listeners,) need and sampler (Sampler) and other components to interact.

 

Element configuration (config Elements  ) 

  Element affects all elements within its range of action.

Pre-processing procedure (Per-processors)

  A sampler element performed before each element within its range of action.

Timers (timers)

  A sampler for each element within its effective range of action

Post processor (Post-processors)

  A sampler element in each element within its range of action after execution.

Assert (Assertions)

  Element of its check result of execution of each element within the scope of the sampler performed.

Listener (Listeners)

  A sampler element information for each element collected and scope presentation.

 

In jmeter, the scope components are tested by the tree structure of the program to determine the paternity elements, the scope of the principle is:

  •  Sampler (Sampler) element and other elements not interact, so the problem is not present scope.
  •  The controller only element acting in its child nodes and a logic sampling logic controller (Logic Controller).
  •  In addition to probe and controller logic elements, other elements category 6, if the child node is a sampler, the public functions of its parent-child node of the element.
  •  In addition to probe and other logic controllers elements like elements 6, if the parent node is not Sampler, then its scope all other descendant nodes (child nodes comprises a child, child nodes, etc.) in the parent member

 

According to two examples:

One,

 

 

Sampler (HTTP request 1, HTTP requests 2, TCP sampler), a logic controller (controller cycle), the listener (graphical results, the result tree view, reporting polymerization)

* HTTP request 1, HTTP requests 2, TCP sampler elements no scope concept.

* The role of the domain controller element cycle is HTTP requests its child nodes 2, TCP sampler.

* Graphical results scope element is an HTTP request 2, TCP sampler.

* Report polymerization, see the results for the tree-membered scope. 1 is an HTTP request, the HTTP request 2, TCP sampler

 

two,

 

 

Sampler (HTTP request, FTP request, TCP sampler, JDBC Request) logic controller (controller cycle, then the controller) the timer (timer fixed, Uniform Random Timer) asserted (in response to assertion, XML asserted) listener ( graphical results, reported polymerization)

 

The scope of the principles, the scope of these elements are:

* HTTP request, FTP request, TCP sampler, JDBC Request no effect element domain concepts

* Cycler scope of FTP requests, TCP sampler and controller then

* Applied to the fixed timer HTTP request, Uniform Random Timer applied to all samplers

* In response to the assertion role JDBC Request, XML assertions act on the request FTP, TCP sampling and JDBC Request.

* Applied to the graphical results FTP request, TCP sampling and JDBC Request, to the action of the polymerization report all acting sampler.

 

Jmeter logic controller (Config Elements) within the scope of its behavior is slightly different as compared with other elements.

  Logic controller element divided into two categories: the default configuration (HTTP default request, FTP default request, etc.) and management (HTTP header management, HTTP cookie management, etc.).

  Wherein the value of default configuration (Configuration Defaults) element may be provided in the scope of superimposed,

  E.g:

  Add two in a HTTP request default test plan, the first of which default settings Server name or IP to www.google.com 

  The default setting of the second Path / page-not-exist, then all HTTP requests default scope of these two elements, its default Server name or IP and are Path Server name or IP and / page-not-exist .

 (Do you have a story, I have a joke, we exchange, both of them owned a story plus a joke.)

  Management (Manager) based logic controller element effects can not be superimposed. If two or more of the same class element management scopes overlap. The sampling element then overlap in scope only by one action, this will lead to uncertainty in the behavior of the sampler. Thus, when a management class logic controllers, the scope must be taken to ensure the same management class element do not overlap.

 

 

Execution sequence element

Understanding of the components have scope to look at the order of execution elements, the execution order of rules are simple elements, in the same role in the domain range, test plan elements perform the following sequence.

(1) Configuration element (config elements)

(2) pre-processing procedure (Per-processors)

(3) timers (timers)

(4) sampler (Sampler)

(5) post processing (Post-processors) (unless Sampler returns the result obtained is empty).

(6) assert (Assertions) (return unless Sampler get results is empty).

(7) the listener (the Listeners) (returns the results obtained unless Sampler empty).

 

On the implementation of the order, there are two points to note:

* Preprocessor, and postprocessor assertions male element can, therefore, without any sampling in their role within the scope of the sampler, it will not be executed.

* If there are a plurality of elements of the same type in the same scope range, once these elements are performed in the vertical order in the test plan.

 

Guess you like

Origin www.cnblogs.com/DeryKong/p/12230029.html
Recommended