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?
-
stackoverflow.com/questions/24512365/…Alexey R.– Alexey R.2018年10月22日 09:47:59 +00:00Commented Oct 22, 2018 at 9:47
1 Answer 1
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:
You can add Jython library to JMeter Classpath and once you restart JMeter you will get possibility to use
python
language in JSR223 Test ElementsJMeter comes with OS Process Sampler so you should be able to kick off your Python function in multiple threads and measure time taken
You will also be able to work with command output if needed: