Configuration Element In Jmeter - jmeter - jmeter tutorial



What is Configuration Element In Jmeter?

  • 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
 process of config element

Let’s discuss some important Configuration Elements:

jmeter tutorials - jmeter load testing - jmeter download - download jmeter - apache jmeter

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.
 configuration of csv data
  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:

 error view in csv data

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.
 process of http request default
  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.
 process of user defined variable

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.

  • You can also add User Defined Cookies, these cookies will be shared to all the Threads.
  • Cookies can be seen using the “View Results Tree” Listener.
  • Such Cookies usually have Expiration time far in the future.
  • HTTP Cookies Manager Panel looks like below figure:

 panel of http cookie manager

This jmeter tutorial site provides you to the following keypoints on meter interview questions , apache jmeter download , apache jmeter , jmeter load testing , jmeter plugins , jmeter download , download jmeter , jmeter tutorials , load testing jmeter , jmeter summary report , jmeter apache , jmeter api testing , what is jmeter , jmeter load testing example , learn jmeter , how jmeter works , jmeter web service testing , jmeter example , jmeter load testing tutorial , install jmeter , load testing with jmeter , download jmeter for windows , performance testing using jmeter , jmeter functions , mobile app performance testing using jmeter , jmeter gui , install jmeter ubuntu , jmeter stress test , how to use jmeter

Related Searches to Configuration Element In Jmeter