0

How can I call python class in JMeter to test the performance of the python code as we do in java by importing jar file and write a script in BeanShell?

0

My expectation is that you should go for combination of threading and timeit as JMeter is a Java based application and it is "alien" for python.


If you still want to do this using JMeter:

  1. You can add Jython library to JMeter Classpath and once you restart JMeter you will get possibility to use python language in JSR223 Test Elements

    JMeter Python from scripts

  2. JMeter comes with OS Process Sampler so you should be able to kick off your Python function in multiple threads and measure time taken

    JMeter Execute Python

    You will also be able to work with command output if needed:

    JMeter Python Execute OS Process Sampler

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.