0
votes

I'm using jmeter in macOS(Big sur) to test some actions. Before main test, I am trying to use JMeter naturally. What I wanna do is to execute multiple commands by jmeter(OS Process Sampler) The scenario is like this. I want to print out the current path by "pwd" command. After that, I want to make Dircetory named dir123 by "mkdir dir123" command. Finally, I want to see all directories and files by "ls" command.

The screenshot is like this. OS Process Sampler

And current Result by "View Results Tree" is like this. View Results Tree

It seems the first command "pwd" is the only command executed. How can I execute more commands?

1

1 Answers

0
votes

You're trying to execute 3 different commands so my expectation is that you should be using 3 OS Process Samplers.

If some reason you want/need/have to do it using single OS Process Sampler - you can use && operator to connect these 3 commands like:

pwd && mkdir dir123 && ls

enter image description here

More information: