Changing python version in Parasoft SoaTest
I need to use paramiko in one Extension Tool test. This python module needs python 2.6 or greater. I have installed in my computer Python 2.7 and 3.4, and configured python interpreter for both. Also, I installed jython 2.7, and configured jython path in the preferences. However, when I run this simple test script:
import sys from com.parasoft.api import * def prueba(): Application.showMessage(str(sys.version))
I'm getting:
2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
My question is what must I do so Soatest takes python 2.7 or plus?
Answers
-
SOAtest includes Jython 2.5.2 which supports Python 2.5. There is a new version of Jython but we are blocked from updating the jar because of some blocking issues on Jython side of which include these:
http://bugs.jython.org/issue2478
http://bugs.jython.org/issue2121For now, you should use the External tool (not Extension tool) to execute an external interpreter (like /usr/bin/python or C:\Program Files\Python\python.exe).
Concerning paramiko, this appears to be an ssh library. You can also consider using a different library. The script engines we provide (Jython, Groovy, etc.) all provide ways to use java libraries. You could consider using JSch, for example.
Also, if you need to use SSH to execute commands or download/upload files, consider using the FTP Client tool which also supports SFTP/SSH commands. http://marketplace.parasoft.com also has a custom "SFTP Client Tool" extension that is similar to the built-in FTP Client tool but supports authentication using SSH keys instead of username/password.
0