Jenkins and Sikuli?

Asked by rick simpson

I'm trying to run sikuli scripts written in python, via a Jenkins job. I can run the scripts from the command line without any problems. If I create a Jenkins job, the jobs always fail because, "Can't find dependent libraries". (see exact error below) If I run the scripts from the command line in the Jenkins workspace for the job, I can run the script with out any problems.

Interestingly, I created a slave/master Jenkins set up, when when I take that approach it fails like the straight master setup, but I can't run the script from the command line in the Jenkins workspace.

I triple checked my environmental variables and they all set up correctly. I check Jenkins and it has Sikuli home and the libs on the system path.

Here's the console dump:

[test_remote] $ cmd /c call C:\Users\ricsimps\AppData\Local\Temp\hudson812610939019708921.bat
The system cannot find the path specified.

c:\Jenkins\workspace\test_remote>java -cp "C:\Program Files (x86)\Sikuli X\sikuli-script.jar" org.python.util.jython ExchangeSuiteRunner.sikuli\ExchangeSuiteRunner.py
Traceback (most recent call last):
  File "ExchangeSuiteRunner.sikuli\ExchangeSuiteRunner.py", line 29, in <module>
    from sikuli.Sikuli import *
  File "C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\sikuli\__init__.py", line 3, in <module>
  File "C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py", line 22, in <module>
java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Sikuli X\libs\VisionProxy.dll: Can't find dependent libraries

 at java.lang.ClassLoader$NativeLibrary.load(Native Method)

 at java.lang.ClassLoader.loadLibrary0(Unknown Source)

 at java.lang.ClassLoader.loadLibrary(Unknown Source)

I'm on Win 7. I'm using a Windows Batch Command build action to make the command line call. The slave seems to be working because the script files are being copied down to the slave.

Any help welcomed. Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

may be faq 2093 helps

.... and there are some more questions here: search jenkins

Revision history for this message
rick simpson (simpson-rick) said :
#2

I did the search and read through all the suggestions before posting. I've tried following the recommendations of most of them that apply to my situation. The most commonly referenced article make the assumption that I'm trying to run native sikuli scripts. As I stated our scripts are written in py and so we can't run them via the ide.bat. I'm trying to use the sikuli-script.jar to run the tests. None of the discussion I've found address how to make the jar work with Jenkins. If you know of a specific article that would be appreciated.

thanks

Revision history for this message
RaiMan (raimund-hocke) said :
#3

--- As I stated our scripts are written in py
Python in the first place is a programming language. If you use Python scripts, that want to use Sikuli features, you have to use Jython as interpreter for your scripts, since Sikuli is based on Java (so it cannot be run with any C-based Python interpreter).

And that is exactly what you are doing: use the Sikuli's bundled Jython interpreter:

java -cp "C:\Program Files (x86)\Sikuli X\sikuli-script.jar" org.python.util.jython

Since it seems, that your scripts have the Sikuli directory structure ( which I guess from ExchangeSuiteRunner.sikuli\ExchangeSuiteRunner.py), you could also use:

java -jar "C:\Program Files (x86)\Sikuli X\sikuli-script.jar" ExchangeSuiteRunner.sikuli

... and this is nearly the same as using
Sikuli-IDE-w.bat ExchangeSuiteRunner.sikuli

the only internal difference is, that sikuli-script.jar's Jython runner internally is called from sikuli-ide.jar (the editor fronted).
Sikuli-IDE-w.bat internally uses javaw.exe, which does not show up any window.

So I think, that any article (especially the mentioned faq) applies to your situation, when it talks about how to setup your local and remote Jenkins with respect to path's (Java, Python, System, ...) or other environment variables.

BTW: with Sikuli X
from sikuli import *
is sufficient.

--- The system cannot find the path specified.
It is not clear which path cannot be found.

Revision history for this message
RaiMan (raimund-hocke) said :
#4

to keep it

Can you help with this problem?

Provide an answer of your own, or ask rick simpson for more information if necessary.

To post a message you must log in.