I have shell script which is kept on remote server(linux machine) and I am trying to call that shell script in between the execution of various test cases of SOAPui from windows. So I have prepared a groovy script:
def command="/usr/bin/ssh -p password username@IP_address bash -s < /home/test.sh"
def proc=command.execute().text
proc.waitFor()
But unfortunately, I am receiving an error:
java.io.IOException: Cannot run program "/usr/bin/ssh": CreateProcess error=2, The system cannot find the file specified error at line: 6
I tried to search more on this, but couldn't get the resolution. Some of the links were:
How to execute shell script using soapUI
http://groovy-lang.org/groovy-dev-kit.html#process-management
/usr/bin/sshsince thecommand.execute()is running locally and in Windows you don't have/usr/bin/ssh. Try to install a ssh client for Windows and use it in your command.puttytake a look on it :)