JMeter – Config Element

JMeter Config Element or Configuration Element set-up the initial setting of a test when the script execution starts. You can also say config elements perform pre-execution activities at the start of any test. Config Elements are used to set up defaults and variables which are used by other elements like sampler etc. during the test.

Config elements are scope specific. It means that you can declare them globally or locally. If they are defined under a sampler then they are processed before that sampler in the same scope and limited to use only for that sampler; cannot be accessed by any other sampler or element which is outside. 

Refer to the scope-flow diagram below:

JMeter - Config Element
Figure 01: Config Element Scope

In the above scope-flow diagram, there are 3 config elements named:

  1. G1: This is a global config element and any thread under the same test plan can access it. Hence Sample 01 and Sampler 02 both can access the G1 config element.
  2. L1: This is a local config element which has scope limited to Thread Group 01 element only. Hence Sampler 01 can access it, but Sampler 02 can not.
  3. L2: This is a local config element which has scope limited to Thread Group 02 element only. Hence Sampler 02 can access it, but Sampler 01 can not.

Possible Parent element(s) of Config Element:

  1. Test Plan
  2. Thread Group
  3. Test Fragment
  4. Sampler
  5. Logic Controller

Possible Child Element(s):

  • NA

You may be interested:


Leave a Comment