assembly execution order and scope jmeter

A, Jmeter important components:

1) :( the Element configuration elements -config the CSV, the HTTP cookies manager, the Http request to the default value )
  is used to initialize variables and the default values, the sampler for subsequent use . Large initial stage of configuration elements of scope processing element is arranged only in the test tree branches it effective, e.g., before any sampler same scope.
2) pre-processor - Pre Processors :( User parameters )
  to do some special operations in the pre-processor will request the sampler before . If the pre-processor attached under a sampler, then it will be executed before the sampler operation. Typically pre-processor for issuing a request to modify some of the sampler is disposed before the sampler, or update the value of certain variables (not get the value of these variables in response to the server).
3) The timer -Timer :( fixed timer, Gaussian random timer, set point )
  for each sampler timer will wait a scope are fixed duration before execution , if such a delay is not set, the JMeter may It will produce a large number of access requests in a short time, causing the server to be overwhelmed with requests. If you add more than one timer thread groups, so long JMeter will stack up these timers, the combined effect of the sampler within the scope range. Timers can be used as a child or sampler logic controller, it affects only the purpose of sampler scope.
4) :( sampler -sampler HTTP request )
  sampler tell JMeter to send a request to the specified server and waits for requests to the server . Sampler which will be performed in order to test the tree, can also be used to change the number of repetitions of a logic controller to run the sampler.
5) post-processor -Post Processors :( regular expression extractor )
  after the post-processor will send a request to do some special operations sampler . If the post-processor attached beneath a sampler, then it will only be performed after the operation of the sampler. Post-processor is typically used to process the server response data, in particular the server response data is extracted.
6) asserts -Assertions :( in response to the assertion )
  users can use assertions to check the contents of the response obtained from the server . Are consistent with the expected response by asserting tester can test server returns
7) listener -Listener :( see the results tree, report the polymerization, the assertion node fruit)
  listener method provides access to the information collected during JMeter test . "Graphical results" when the listener system will respond to a long drawn a picture into. "Results Tree View" listener will show details sampler requests and responses, you may also be introduced into the test data file for subsequent analysis.
8) logic controller -Controller :( only one controller )
  logic controller can help users to control JMeter test logic, especially when the transmission request. Logic controller may change the test execution order requesting sub-element.
  Here Insert Picture Description

Second, the components perform the sequence:

Test program elements is ordered, performed in the following manner:
1- arranged element (Config the Element)
2- pre-processor (PreS Processors)
3- timer (the Timer)
4- sampler (Sampler)
after 5- -processor (Post processors, only in case the outcome of the next available)
6- asserted (assertions, only in case the outcome of the next available)
7- listener (listener, only in case the outcome of the next available)

Third, the components Scope:

Each sampler elements as its scope of information collected and presented in jmeter, the scope is the parent-child relationship element tree by the test program to determine the elements, principles scopes are:
• Sampler (sampler): elements and other elements not interact, and therefore the scope of the problem does not exist.
• logic controller (Logic Controller): effect element controller only sampling of its child nodes and logic.
• In addition to the sampler and controller logic elements, other elements category 6, if the sampler is a child node of the node element acts only on its Sons.
• Other elements in addition to class 6 sampler and controller logic elements, if not Sampler parent node, then its scope all the other elements of the descendant nodes under the parent node (child node comprising a child node, a child node, etc.) .

Fourth, the Special Instructions:

Element configuration (Config Elemnet) -> User-defined variable component (User Defined Variables): no matter which position on the component, which defines the variables will be shared across threads.
For example:
The following example, test plan is defined as follows:
1, defines three Sampler: one, the Debug Sampler, TWO
2, defined below at one of a user-defined variables: here adds a variable, called Hello, value for the world
3, a listener: tree View results
Objective: To test the variables defined in the sampler one whether sampler two and debug sampler can be cited

one:
Here Insert Picture Description
User Defined Variables:
Here Insert Picture Description
two:
Here Insert Picture Description
Run Results:
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
From the above: one variable in a user defined below, can be used normally in the debug sampler and two.

Reference:
http://www.cnblogs.com/fnng/archive/2012/12/27/2836506.html

Published 44 original articles · won praise 1 · views 1418

Guess you like

Origin blog.csdn.net/cc_park/article/details/104189335
Recommended