What would be the best approach way to execute the test script on different machines?

Asked by Alex Yi

Hi,

I have basically written a test script using the Sikuli IDE and planning to export the script to an executable file.
With this approach, you need to install Sikuli on the target machine as well as the unittest2 package. And apparently, different screen resolutions make the test fail but this is something that I look forward to be asking later.

I was wondering if integrating with Junit would alleviate the steps required to run the test exectuables.
Perhaps, creating a jar file of the test script and running on a machine that has JVM. I haven't looked into junit/sikuli yet but was wondering if this is a possibility.

IS this a possibility? Are there other suggestions?

Thank you,

sincerely,

Alex Yi

Question information

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

--- preparing to run a Sikuli workflow on other machines
If you want to run something, that contains Sikuli features (either a Sikuli script or a Java program including the images), on another machine, besides having a JRE 6 on that machine, you at least need sikuli-script.jar and the libs folder from the Sikuli installation and have to setup an environment for the Sikuli stuff.

You could pack all this together into a .jar, that on the target system unpacks itself and runs the tests.
You would have to program some additional stuff, to support this "self-extracting", since scripts, images and native libs cannot be directly used by Sikuli being in the .jar, so they must be copied to the outside before starting a Sikuli workflow.

And if necessary, you need some removal procedure for the things you have added to the system before including the registry additions and the temp folder.

And this would become even more complex, if the target system is not the same as the development system.

Another possibility might be to use something like Portable Apps, if you want to carry your stuff around on a stick and be able to run on any system you are prepared for (I once had this up and running including Java, so the target system did not need to have any prereqs).

Be aware, that the so called executable (.skl) does not have any additional features, it is only the zipped version of the corresponding .sikuli. I guess it was added from the beginning, to have a compact form of the script folder, that could be stored in the net for download or sent by email. I never use it, because you then have 2 versions of your script, since the .skl cannot be opened in the IDE again.

--- different screen resolutions ...
... as such is not a problem, as long as the images stay the same pixel by pixel and only LOOK larger or smaller.
Only if the rendering process leads to different pixel representations (e.g. on Windows using different skin setups or differences produced by the rendering engines of different browsers) for the same visual object, then you have to be prepared for that.
Usually this is solved by having different image sets for different rendering setups.

Revision history for this message
Alex Yi (ayi) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
Alex Yi (ayi) said :
#3

Thank you so much RaiMan. I really appreciate it.