JMeter Execution Order - PostProcessors

Q

In what order PostProcessors are executed in JMeter?

✍: FYIcenter.com

A

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

  1. If a PostProcessor is attached to a Sampler, it is executed after the Sampler.
  2. If a PostProcessor is attached to a container (Test Plan, Thread Group, or Logical Controller), it is executed after to each every Samplers in that container tree branch.
  3. If a Sampler has multiple PostProcessors inherited from multiple level of parent nodes, PostProcessors from a near parent are executed first.
  4. If a Sampler has multiple PostProcessors inherited from parent nodes and attached as child leaves, PostProcessors from parent nodes are executed first.
  5. Multiple PostProcessors attached to the same parent node are executed sequentially.

Let's create the following Test Plan tree, JMeter-Execution-Order-4.jmx, to verify these rules:

Test Plan
   |- setUp Thread Group
   |     |- Sampler Z
   |- tearDown Thread Group
   |     |- Sampler A
   |- Thread Group 1
   |     |- Sampler 11
   |     |- Sampler 12
   |     |- If Controller (1==2)
   |           |- Sampler 13
   |- Thread Group 2
   |     |- PreProcessor 2
   |     |- PostProcessor B
   |     |- Sampler 21
   |     |- Sampler 22
   |     |- If Controller (2==2)
   |           |- Sampler 23
   |                 |- PostProcessor C
   |                 |- PreProcessor 3
   |- PreProcessor 1
   |- PostProcessor A

Run the above Test Plan. You see the following execution order:

PreProcessor 1
Sampler A
PostProcessor A - Rule 2 applied

PreProcessor 1
Sampler 11
PostProcessor A - Rule 2 applied

PreProcessor 1
Sampler 12
PostProcessor A - Rule 2 applied

PreProcessor 2
PreProcessor 1
Sampler 21
PostProcessor B - Rule 3 applied
PostProcessor A

PreProcessor 2
PreProcessor 1
Sampler 22
PostProcessor B - Rule 3 applied
PostProcessor A

PreProcessor 2
PreProcessor 1
PreProcessor 3
Sampler 23
PostProcessor B - Rule 3 applied
PostProcessor A - Rule 4 applied
PostProcessor C

PreProcessor 1
Sampler Z
PostProcessor A - Rule 2 applied

 

JMeter Execution Order - Assertions

JMeter Execution Order - PreProcessors

JMeter Test Elements and Execution Order

⇑⇑ Apache JMeter Tutorials

2018-10-13, 2733🔥, 0💬