Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

SSH into another server from SOAtest

Options
BrianQuantum
BrianQuantum Posts: 23

I run SOAtest from my laptop. After certain actions, I would like to be able to have SOAtest, using a custom script, SSH into a Linux server, issue a command in that server, then exit. I assume that this can be done in a java or groovy script. Anyone have any thoughts? Thanks

Comments

  • Ireneusz Szmigiel
    Ireneusz Szmigiel Posts: 227 ✭✭✭
    Options

    @BrianQuantum

    yes, you should be able to do this using two possible ways:
    -use External Tool with calling appropriate command for ssh and parameters
    -use scripting, and the simplest solution with subprocess module in Jython

    process = subprocess.Popen("ssh example.com ls", shell=True,
    stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    output,stderr = process.communicate()
    status = process.poll()
    print output

    -use similar approach in groovy
    -use specialized module for Python ( there are few)

    --
    Ireneusz Szmigiel
    http://www.catb.org/esr/faqs/smart-questions.html