Jython Imort Error when Runnig SOA test scripts from Jeninkins using CLI
Hi, I am seeing this error on Jenkins reports when trying to use Jython script to generate random string.
The error is:
Error during script execution. View Details for more information. Traceback (most recent call last): File "", line 1, in ImportError: No module named random
I am using Jython scripts and using "import random, string".
On my local GUI SOA Test tool i added the Jenkins library path in preferences under scripting but i am not sure what to do when i am running th scripts from Jenkins via soatestcli
@benken_parasoft or anyone, Please help. Thanks
Answers
-
On my local GUI SOA Test tool i added the Jenkins library path in preferences under scripting but i am not sure what to do when i am running th scripts from Jenkins via soatestcli
Are you able to upgrade to the current SOAtest release? SOAtest uses Jython Standalone which includes the Python Standard Library including the "random" module. Now, you can use modules from the Python Standard Library without needing to configure the path to any external Jython installation.
Otherwise, you can set a "python.home" java system property when running soatestcli:
soatestcli.exe -J-Dpython.home=c:\jython
0