JMeter Execution Order - Configurations

Q

In what order Configurations are executed in JMeter?

✍: FYIcenter.com

A

Configurations of all types are executed in the order described in the rules below:

  1. If a Configuration is attached to a Sampler, it could be applied to the Sampler.
  2. If a Configuration is attached to a container (Test Plan, Thread Group, or Logical Controller), it could be applied to each every Samplers in that container tree branch.
  3. If a Sampler has multiple Configurations of the same type inherited from multiple level of parent nodes, Configurations from a near parent override others from far parents.
  4. If a Sampler has multiple Configurations of the same type inherited from parent nodes and attached as child leaves, Configurations attached as child leaves override others from parents.
  5. Multiple Configurations of the same type attached the same tree node, the first Configuration overrides others.
  6. Only a single Configuration of each type that survived from overriding rules applied to the Sampler.
  7. "User Defined Variables" Configuration is an exception. It is processed at the start of a test, no matter where it is placed.

Here is an example test plan tree from JMeter manual:

Test Plan
   | - Thread Group
          |- Simple Controller
		  |     |- HTTP Cookie Manager (Configuration)
		  |     |- Web Page 1 (Sampler)
		  |     |- Loop Controller
		  |           |- Web Page 2 (Sampler)
		  |           |- Web Default 1 (Configuration)
          |- Web Page 3 (Sampler)
          |- Web Default 2 (Configuration)

If the above test plan is executed, you see configurations applied as below:

  • "HTTP Cookie Manager" applied to "Web Page 1", because it is applied to all Samplers in the tree branch.
  • "HTTP Cookie Manager" applied to "Web Page 2", because it is applied to all Samplers in the tree branch.
  • "HTTP Cookie Manager" is not applied to "Web Page 3", because it is not applied to other Samplers outside the tree branch.
  • "Web Default 1" is applied to "Web Page 2", because it is applied to all Samplers in the tree branch.
  • "Web Default 1" is not applied to "Web Page 1", because it is not applied to other Samplers outside the tree branch.
  • "Web Default 1" is not applied to "Web Page 3", because it is not applied to other Samplers outside the tree branch.
  • "Web Default 2" is applied to "Web Page 1", because it is applied to all Samplers in the tree branch.
  • "Web Default 2" is not applied to "Web Page 2", because it is being overridden by "Web Default 1".
  • "Web Default 2" is applied to "Web Page 3", because it is applied to all Samplers in the tree branch.

 

JMeter Test Elements and Execution Order

⇒⇒Apache JMeter Tutorials

2017-11-26, 159👍, 0💬