remote execution in sikuli-x

Asked by shilpashree

does sikuli-x support remote execution? i.e. running the script in 1 machine with the target application in another machine

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

This is not a feature in the moment, but they are working on some VNC based solution.

Most people use a Remote Screen application, so they have the screen content of the remote machine on the same machine as Sikuli is running on. Problems come up here (special configuration needed or it does not work at all) if the remote machine does not produce real screen output (running headless, no monitor attached). There are some hints about that in bugs and answers.

Another possible solution is to use XML-RPC, since Sikuli/Jython comes with a basic XML-RPC server (one request at a time, but requests are queued). so you can trigger Sikuli functions on the remote machine and get information back to client. As far as I know: this is possible even on the Java level (not my focus, I have it running on the Python level).

Revision history for this message
Jonathan Antognini (jantogni) said :
#2

i use the next procedure:
- configure an ssh server with all necessary to execute sikuli
- access to ssh server (ssh -X user@server)

when i execute sikuli script, this script work into my X server, that means X server where i access.

Regards

Revision history for this message
Rahul Misra (rmisra) said :
#3

I have two questions:
1. I am using ssh demon from cygwin. Does one need to do any specific settings for SSH server?
2. I am using the following command to run sikuli script:

ssh -X <email address hidden> "export JAVA_HOME='/cygdrive/c/jdk1.6.0_26_32bit'; export SIKULI_HOME='/cygdrive/c/Program Files/Sikuli X';export PATH='/usr/local/bin:/usr/bin:/cygdrive/c/PHP:/cygdrive/c/Program Files/CollabNet/Subversion Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Program Files/Perforce:/cygdrive/c/Program Files/Groovy/Groovy-1.7.5/bin:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/c/Program Files/Java/jdk1.6.0_22/bin:/cygdrive/c/Tools/apache-ant-1.8.2/bin:/cygdrive/c/Program Files/MySQL/MySQL Server 5.1/bin:/cygdrive/c/Program Files/Sikuli X/libs:/cygdrive/c/Program Files/Java/jre6/bin:/cygdrive/c/Program Files/Java/jdk1.6 .0_22/bin';export DISPLAY=localhost:0.0; cd /cygdrive/c/cygwin/home/builder/atf/atf; ant -lib common/lib -DSERVER_NAME1=koc run"

The last command is a test harness which executes sikuli for java (not running python)

But this does not work for me. Program is running but its unable to find images. Just wondering if I am missing anything in my settings.

Thanks!!!

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

@ Rahul

Settings seem to be ok.

Which version of Sikuli do you use?

How do you check or see, that Sikuli is running?

Are the image files not found on disk or does the finding of images fail?

Any error messages or other logs on Sikuli?

Revision history for this message
Rahul Misra (rmisra) said :
#5

Sikuli version 1.0rc3 (r905)

The issue is image files are not being found. Here is the error log:

java.lang.Exception: java.lang.Exception: Exception in processStep
Caused by:

FindFailed: can not find C:\cygwin\home\builder\atf\atf\php\koc\built\classes\koc\imgs\no_thanks.png
Line ?, in File ?
 at org.sikuli.script.Region.handleFindFailed(Region.java:374)
 at org.sikuli.script.Region.wait(Region.java:467)

I am also capturing a image dump when there is an exception and that png is all black.

Appreciate the help. I think if I can make this work, we should publish a doc on sikuli wiki for this. Any automated harness execution environment will need this.

Thanks!!!

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

@ Rahul

Does the machine, Sikuli is running on, have a real screen, that is working during script run.

The black screenshots seem to tell me, that the machine does not have an active monitor?

Revision history for this message
Rahul Misra (rmisra) said :
#7

No the machine does not have an actual monitor. Thats the whole idea. We have these VM's (30+) on which we want to run tests for different browser/os combination's. I did installed VNC Server on each. Was hoping that -X display option along with VNC will resolve the display issue!!!

Thanks

Revision history for this message
Rahul Misra (rmisra) said :
#8

I was able to achieve this using a vncrobot.

http://vncrobot.en.softonic.com/

This utility allows to interact with any machine running vnc server.

Steps:
1. Install vnc server on the windows box
2. Download this zip (its an exe). Running the exe creates a zip
3. Unzip the zip on linux box
4. Create a script (bat file) to run a commands on windows box (this script can launch your application etc; whatever one wants to do)

Example:

Report "index.html"
procedure startApp {
  Press Windows+r wait=3s
  Typeline "{1}" wait=4s
}

# Start calculator, type "5+5" followed by Enter and take a screenshot.
startApp "C:\cygwin\home\builder\atf\atf\runatf.bat" wait=2s

5. run: /vncrobot.sh -c <vnc server>:<display> -r ./execATF.tpr -n

As you can see, this will connect to windows box and run my bat on that box.

Its free and works flawlessly!!!

HTH

Can you help with this problem?

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

To post a message you must log in.