Jmeter Preprocessor | PRE-PROCESSOR - jmeter - jmeter tutorial



What is Jmeter Preprocessor?

  • Pre-Processor element is defined to alter the settings of Samplers in their scope. It will always execute before the actual sampler request. Pre-Processors elements list is as follows:
    • BeanShell PreProcessor
    • BSF PreProcessor
    • HTML Link Parser
    • HTTP URL Re-writting Modifier
    • JDBC PreProcessor
    • JSR223 PreProcessor
    • RegEx User Parameters
    • Sample Timeout
    • User Parameters
 process of preprocessor

Some common types of Pre-processors:

1. User Parameters:

  • User Parameter element is used to define variables and its values, specific to individual threads.
  • User Parameter values will be defined for the current sampler only, unlike User Defined Variables in test plan which are available to all the samplers in the scope.
 process of user parameter
  1. Update Once Per Iteration Checkbox: A flag to specify whether the User Parameters element should update its variables only once per iteration.
  2. Add Variable: New empty row can be added to define variable
  3. Add User: New column can be added for user/thread

2. HTML Link Parser:

  • HTML Link Parser is used to parse HTML response from the test server and to extract links/forms.
  • If we use this preprocessor with a sampler, that URL test sample will be examined to see if it matches any of the links/forms which extracted from the previous response. If this is the case then it will replace the URL test sample values from the matching link/form.
 process of html link parser
jmeter tutorials - jmeter load testing - jmeter download - download jmeter - apache jmeter

3. HTTP URL Re-writing Modifier:

  • HTTP URL Re-writing Modifier is quite similar to the “HTML Link Parser”.
  • However, it is more efficient and easy to use because it has a specific goal to achieve.
  • For Instance: If your web application uses URL rewriting to store session Ids instead of cookies, you can define this element at the Thread Group level similar to the HTTP Cookie Manager.
  • You are required to mention Session Id parameter name, then it will find it on the page and will pass argument to every request of that Thread Group.
 process of http url rewriting parser
  1. Session Argument parameter name is used to fetch value (href/form) from previous response.
  2. If you web application rewrite URLs by appending a semi-colon and session Id parameter, then select it.
  3. If your web application rewrite URLs without an “=” sign between parameter name and its value, then select it.
  4. It will prevent query string in the path extension.
  5. Check “Cache Session Id” checkbox, if session Id is to be saved for later use, when there is no session Id present.
  6. URL Encode value while writing parameter.

4. RegEx User Parameters:

  • RegEx User Parameters element let us stipulate dynamic values for HTTP parameters extracted from other HTTP Request with the help of Regular Expressions.
  • RegEx User Parameter are specific to individual threads in a test plan.
 process of regex user parameters

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 Jmeter Preprocessor | PRE-PROCESSOR