0

1.we can add beanshell pre / post processor, but I want for all request.
2. Also, beanshell / BSF sampler can be used, but while exection, it will be displayed in report.

So what I want is to have a place where i can write code and can use as "config element".

Is there any way for that ?

Bhomik
  • 73
  • 11

1 Answers1

0

There's no scriptable "config element", so you have a few options:

  1. Create a new scriptable config element as a JMeter plug-in
  2. Use a script inside one of the fields inside another config element. For example:

    enter image description here Here I defined a User Defined Variables configuration element, and specified a script as a value of a variable.

  3. Use BeanShell/BSF PreProcessor on Thread Group level:

    enter image description here

    It will run at the beginning of every iteration for every thread. Or similarly BeanShell/BSF PostProcessor on Thread Group level will run after each iteration on each thread.

timbre timbre
  • 12,648
  • 10
  • 46
  • 77
  • I tried option 2, but it didn't worked. Option 3 will execute that code for each request and will impact the execution time. For option 1, is there any such plugin available ? Jmeter's documentation are very poor for this. – Bhomik Jun 21 '16 at 14:38