2

in SoapUI I had the ability to execute test steps and http requests using JavaScript to allow more dynamic tests. After facing some problems I moved to JMETER.

After searching other questions and the Jmeter documentation, I can't find a way to call http samplers using the JSR223/BeanShell samplers in JMeter. None of the built-in objects provided such method as far as I saw.

Thank you very much :)

  • Can you explain in more details what are you trying to do? you want to execute http sampler in test plan using script? – Ori Marko Aug 27 '17 at 08:23
  • @user7294900 Yes, I want to execute an HTTP sampler inside the script to involve more test logic around it – Jonathan Berg Aug 27 '17 at 08:57
  • You can add script in JSR element and assign to variable `condition` true/false and then use ${conditon} in `If Controller` – Ori Marko Aug 27 '17 at 08:59
  • @user7294900 thats not good for me because I want to call multiple http samplers inside a loop, with changing variables, in the script – Jonathan Berg Aug 27 '17 at 09:01

1 Answers1

0

Can you give more details on your use case ?

JMeter philosophy is to combine Controller (if, while, loop, foreach):

JSR223 pre/post processors :

with groovy and samplers.

I am sure your use case can be done using those components as we do on a regular basis very complex scenarios with them

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116