Does anybody knows how to execute series of commands over SSH from Jmeter. I used SSH Sampler as mentioned on http://www.technix.in/execute-linux-command-shell-script-apache-jmeter/#comment-8456 and was able to login to remote server with my own user. However, I want to do few more steps. Not sure how I can do
- Sudo to a different user – ‘sudo su – report’
- Change to some directory
- Run some shell script which is already there
The Shell script will produce some output file. I need to SFTP the output file from there to local Jmeter directory
Write some tests to verify the output file. THis can be done later but how to do first 4 steps.
The main problem I am facing is that I am not able to understand how I can run series of commands in SSH Sampler. I tried using ; and it worked. However I am not able to do Sudo and run shell script from there.
Any help would be much appreciated.
Cheers! Vivek