Enroll in Selenium Training

Configuration Element enable us to declare variables, so Samplers can use data through these variables. Configuration element is accessible from only inside the tree node where you defined it. Also, if a configuration element is defined inside a tree node, it will have high precedence than the same configuration element which is defined in a parent node.

List of available Configuration Elements is as follows:

  • Counter
  • CSV Data Set Config
  • DNS Cache Manager
  • FTP Request Defaults
  • HTTP Authorization Manager
  • HTTP Cache Manager
  • HTTP Cookie Manager
  • HTTP Header Manager
  • HTTP Request Defaults
  • Java Request Defaults
  • JDBC Connection Configuration
  • Keystore Configuration
  • LDAP Extended Request Defaults
  • LDAP Request Defaults
  • Login Config Element
  • Random Variable
  • Simple Config Element
  • TCP Sampler Config
  • User Defined Variables

Configuration Elements

Let’s discuss some important Configuration Elements:

1: CSV Data Set Config:

CSV Data Set Config element is used to read data from a text or CSV format file. For Example, If you need to perform load test of login scenario with 100 unique users. Prepare the data in CSV file with 100 user records with username and password, and you can use this file data in every thread through variables in your requests/samplers by using this configuration element.

Config_Element_2

  1. Add “CSV Data Set Config” Element where it will be used
  2. You can give file path or filename of your text/CSV file. If file is stored in the same location as your “Test Plan” is, then give only filename.
  3. Give variable names for text/CSV file column values, use these variable as “$username” / “$password” in samplers
  4. Select sharing mode

Following is the sample text file which contains user credentials for login scenario:

Config_Element_3

2: HTTP Request Defaults:

HTTP Request Defaults Configuration Element let us set default values to be used in HTTP Request Samplers.

For Example: You need to send 100 HTTP Requests to the same server, then you can utilize HTTP Request Default element with your “Server Name or IP”. Now, there is no need to give “Server Name or IP” in all 100 HTTP Requests explicitly. The requests will get “Server Name or IP” from the HTTP Request Default, just give the relative path of the web pages in samplers/requests.

Config_Element_4

  1. Give Server Name or IP without (http://) prefix.

3: User Defined Variables (UDV):

User Defined Variables Element let us use default variables and values in the test plan. If you need to use UDV in only one Sampler, then define it under that Sampler. If you need to use UDV in multiple parts, then define it at the start of Test Plan.

Config_Element_5

4: HTTP Cookie Manager

HTTP Cookie Manager is used to store cookies which targeted server sends in the response of your Http request. The saved cookies can be used in other samplers/requests of the Test Plan.

  1. You can also add User Defined Cookies, these cookies will be shared to all the Threads.
  2. Cookies can be seen using the “View Results Tree” Listener.
  3. Such Cookies usually have Expiration time far in the future.

HTTP Cookies Manager Panel looks like below figure:

Config_Element_6

Similar Articles

Feedback