1

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?

asked Oct 22, 2018 at 9:36
1

1 Answer 1

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:

  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

answered Oct 22, 2018 at 14:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.