Configuration is a test plan element in JMeter using which we can declare variables such that samplers can use data using these variables. Configuration nodes are executed at the beginning of the node in which they are defined. A configuration element in a tree branch has a higher precedence than the same element in the parent branch.
Add a Config element:
Right Click on Test Plan/Thread Group/Logic Controller → Add → Config Element → Select the required Config Element
Listed below are available Configuration nodes available in JMeter.
- CSV Data Set Config – this configuration helps to read data in the form of a csv file .For e.g. when we want to login using different set of unique users we can store the username, password in a CSV file and use this file data in each thread via variables.
- HTTP Request Defaults: We can set default values for HTTP requests using this configuration element.
- User defined Values: This configuration element is used in defining user variables in the form of key value pairs which can be used in tests.
- Counter – This allows a variable to increase count after every iteration.
List of other configuration nodes available in JMeter are as below:
• FTP Request Defaults
• HTTP Authorization Manager
• HTTP Cache Manager
• HTTP Cookie Manager
• HTTP Proxy Server
• HTTP Header Manager
• Java Request Defaults
• Keystore Configuration
• JDBC Connection Configuration
• Login Config Element
• LDAP Request Defaults
• LDAP Extended Request Defaults
• TCP Sampler Config
• Simple Config Element
• Random Variable •
Pre-processor:
Pre-processor are JMeter test elements used to modify sampler requests before their execution. Pre-processor attached with a sampler always executes before the sampler.
Add a Config element:
Right Click on Thread Group/Logic Controller → Add → Pre-Processors → Select the required Pre-Processors
Listed below are all Pre-processor test elements provided by JMeter:
- JDBC Pre-processor
- JSR223 Pre-processor
- RegEx User Parameters
- Bean Shell Pre-processor
- BSF Pre-processor
- HTML Link Parser
- HTTP URL Re-writing Modifier
- HTTP User Parameter Modifier
- User Parameters
Post - processor – Post processor are JMeter test elements used to modify sampler requests after its execution. Post-processor attached with a sampler always executes after the sampler.
Add a Config element:
Right Click on Thread Group/Logic Controller → Add → post-Processors → Select the required post-Processors
Post-Processor elements list is as follows:
- BeanShell PostProcessor
- BSF PostProcessor
- CSS/JQuery Extractor
- Debug PostProcessor
- JDBC PostProcessor
- JSON Path PostProcessor
- JSR223 PostProcessor
- Regular Expression Extractor
- Result Status Action Handler
- XPath Extractor