How to execute unix shell scripts from within SOAtest
What is the best way to execute shell scripts which reside on a remote unix/aix server? Are there any standard or market place SOAtest building blocks that can cater for that?
Preferably I would like to store the unix commands for a testcase to be executed in a single cell in an Excel sheet that is integrated as a datasource in the framework.
Are there any scripting examples available with e.g. the External/Extension Tool which trigger Putty that can do the job?
The unix commands can be fairly simple from kicking of the module-under-test with some arguments upto Perl scripts that sort and filter generated output files.
Thanks in advance.
Daniel
Comments
-
You are using the SFTP Client from the Parasoft Marketplace, right? I haven't tried but maybe it can execute arbitrary remote commands on the remove host, like call "/bin/bash" with a path to a script as an argument. I haven't tried this but thought I'd mention this first just in case it happens to work.
Alternatively, there are arguments that you can pass to the unix "ssh" command to execute a command on a remote host. So, if you are running SOAtest on Linux or Mac then you can configure an External Tool to invoke "/usr/bin/ssh" directly. If you are on Windows, you could use "ssh" from Cygwin or maybe call something else like winscp or putty which has a similar command line feature.
1 -
Hi, thanks for the suggestions. I just tried to include the bin/bash command in the SFTP-client, but got an exception from the tool:
SFTP Client failed with a fatal error: No enum constant
com.parasoft.soavirt.tool.sftp.client.SftpCommand.Command./BIN/BASH. View Details for more information. IllegalArgumentExceptionI might thus have to opt for putty from the External tool, because I am working from a windows client. Hopefully I get it to work eventually with a datasource construction, instead of using loose external text/batch files.
0 -
SFTP Client failed with a fatal error: No enum constant
Looks like the tool (as of right now) only supports the following commands:
PUT, GET, RENAME, LN, RM, LMKDIR, BYE, EXIT, QUIT, CD, LCD, LS, PWD, RMDIR, CHGRP, CHMOD, CHOWN, SYMLINK, MKDIR, LLS, LPWD, LUNMASK, HELPSo, anything other than one of those would appear to fail with that "No enum constant" message.
I might thus have to opt for putty from the External tool
Yeah, that may be what you need to do for now.
0