Pages

Monday 30 January 2017

JMeter - PreProcessor - "BeanShell PreProcessor"

BeanShell PreProcessor is a scripting-based PreProcessor. It means that you will need to implement the preprocessor logic by yourself using one of the supported scripting languages. Usually, it is helpful when you need to define logic based on your requirement and want to write some unique algorithm which is not currently provided by JMeter. You can create your own implementation of the algorithm using BeanShell PreProcessor.

How to add "BeanShell PreProcessor" element?
You can follow below steps:
1. Select "Test Plan" or "Thread Group" or "Controller" or "Sampler" node where you want to add PreProcessor.
2. Right-click on the node
3. Mouse hovers "Add"
4. Mouse hovers "PreProcessor"
5. Click "BeanShell PreProcessor"

How to remove "BeanShell PreProcessor" element?
You can follow below steps:
1. Select "BeanShell PreProcessor" node
2. Right click on "BeanShell PreProcessor" node
3. Click "Remove" (Mouse) or "Delete" button from the keyboard
4. Click "Yes"    

What are the attributes of "BeanShell PreProcessor" element?

"BeanShell PreProcessor" has following attributes:
  • Name: To provide the name of the timer
  • Comments: To provide arbitrary comments (if any)
  • Reset bsh.Interpreter before each call: Interpreter will be recreated by selecting the value of this option as 'Yes'. 
  • Parameters: Parameters to pass to the BeanShell script. This is an optional attribute.  
  • Script file: A file containing the BeanShell script to run. The return value is used as a preprocessor output generated by BeanShell script.
  • Script: The BeanShell script which contains the PreProcessor Logic.
Next Topic:
Apache JMeter - "HTML Link Parser" Pre-Processor Element

Previous Topic:
Apache JMeter - "Pre-Processor" Element

Related Topics:

No comments:

Post a Comment