Home > other >  How can I run commands of a python script from OS process sampler jmeter?
How can I run commands of a python script from OS process sampler jmeter?

Time:05-19

I have main.py which runs certain functions... and I want to test in jmeter. I've been told that OS process sampler can do it but I don't have any idea on how to do it...

Can anybody help me?

CodePudding user response:

Given you have main.py file with the following code:

import sys


def hello():
    print('Hello, '   sys.argv[1])


hello()

You can run it using JMeter's enter image description here

the output can be observed using enter image description here

More information: How to Run External Commands and Programs Locally and Remotely from JMeter

  • Related