I am struggling with jmeter for running cmd command to remote desktop. I use the OS sampler. I have a command that if I run it from the command line from my computer it worked, but when I try to make jmeter to run it, it failed - I use the same computer. the command is:
plink -ssh [email protected] -pw passtest sudo /opt/test/test.sh
I added an OS sampler as followed:
the working directory is the cmd.exe directory. and the command is the full command I want jmeter to run, the same one that working perfectly on cmd direct.
I get this error:
Response message: Exception occurred whilst executing system call: java.io.IOException: Cannot run program "plink -ssh [email protected] -pw passtest sudo /opt/test/test.sh" (in directory "c:\windows\system32"): CreateProcess error=2, The system cannot find the file specified
I do not know which file jmeter wants, I just want him to run the command, to connect to remote computer and run the command, the command working perfectly in command line and run the script in the remote computer.
I found this blog in the net: https://www.blazemeter.com/blog/how-run-external-commands-and-programs-locally-and-remotely-jmeter
that said that it can be done, but since it is easy they not displayed step by step instructions.
when I change the command to dir, it run OK and the results are like I write dir in command line.
How can I make jmeter open the command line and just put the command and press enter, and display the results?