BeanShell PreProcessor

JMeter – BeanShell PreProcessor

A script-based preprocessor in JMeter is called the BeanShell PreProcessor. It means that you can use any of the supported scripting languages to build the preprocessor logic yourself. It’s usually useful when you need to build logic according to your needs and want to write a special algorithm that JMeter doesn’t provide yet. Using the BeanShell PreProcessor you can implement your own algorithm.

How can I add ‘BeanShell PreProcessor’ to JMeter?

Choose the element that corresponds to the Preprocessor

  1. Test the plan that you want to add.
  2. Sampler for Thread Group Logic Controllers
  3. Right-click on the component.
  4. Mouse over ‘Add’
  5. ‘Preprocessor’ is highlighted when you mouse over it.
  6. Select ‘BeanShell Preprocessor’.

JMeter - BeanShell PreProcessor

Which input fields are there?

Name: To specify the timer’s name

Please leave arbitrary remarks, if any.

Reset the bus. Before each call, the interpreter: Selecting the ‘Yes’ option for this option will result in the creation of a new interpreter. 

Parameters: To be passed to the BeanShell script as parameters. This quality is optional.  

Text file: a file with the BeanShell script that needs to be executed. The return value from the BeanShell script is used as a preprocessing output.

PreProcessor Logic is contained in the BeanShell script.

Scroll to Top