0
votes

My understanding of how the test processor processes the various tasks suggests that having the listener above the sampler has no effect to the fact that the listener is invoked only after the sampler starts executing. Similarly, having the preprocessor that sets a variable after the http sampler task has no effect to the fact that the variable is available to the http sampler irrespective of whether the preprocessor task is before or after the http sampler.

In the test plan settings, we can choose to run the thread group consecutively or not. However, within the thread group, assuming we have tasks like the below list. Is there any implicit ordering sequence that is enforced/followed by the test processor (like the example I have provided in paragraph 1)?

  1. Couple of HTTP request (samplers)
  2. HTTP header manager (config element)
  3. JSR223 PreProcessor (pre processor)
  4. Summary Report (listener)
  5. View result tree (listener)
  6. Flow control action (sampler)
  7. FTP request (sampler)
  8. If controller (logic controller) which contains few HTTP samplers
  9. JSON extractor (post processor)
  10. Response assertion (Assertion)
  11. Constant timer (Timer)
  12. Constant throughput timer (Timer)
1

1 Answers

1
votes
  1. Samplers are executed upside down (or according to the Logic Controllers)
  2. Other test elements are executed according to the Execution Order which looks like:

    1. Configuration elements
    2. Pre-Processors
    3. Timers
    4. Sampler
    5. Post-Processors (unless SampleResult is null)
    6. Assertions (unless SampleResult is null)
    7. Listeners (unless SampleResult is null)

    also be aware of Scoping Rules, for example if you have a PreProcessor which is a child of a certain Sampler - it will be executed before this sampler only. If the PreProcessor is located at the same level as several Samplers (or higher) - it will be executed before each sampler.