Jython or Java?

Asked by Rahul Misra

I want to start using Sikuli for automation but wanted to get some idea as to which approach is easier/powerful for a full fledged project: directly code in java or write jython and call that from java?

Please share the good/bad of your experiences if possible.

Appreciate it!!!

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
vitalliuss (vitalliuss) said :
#1

I write scripts (automated tests) in jython and launching them using sikuli console runner.
It's easy to use SciTE text editor for code writing.

Revision history for this message
Vince (melekal) said :
#2

I tried it both ways and found that using the Sikuli-IDE for creating tests cases to be easy and intuitive. However, once I got past that point and started trying to modularize my testing it became difficult to use. I found the benefits of using Eclipse and writing my tests in Java to outweigh the benefit of simple tests through the Sikuli-IDE. The only problem you'll find is that very few of the answers you'll find to problems are related to writing tests directly in Java.

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

@Vince: totally agreed.

If someone is used to programming in Java, using the Sikuli Java API directly is the first choice.

To get familiar with the Sikuli features and learn how to make workflows, the IDE might help in the beginning. On one hand it is rather easy, to transcript to Java code, but on the other hand, the two API levels are still not consistent (will be better with rc3) and in Java, you always have to qualify with a region (no default screen object).

Furthermore you can use the IDE to manage your image libraries and make some short tests quick and dirty.
It is possible to build jar files containing your private Sikuli classes and functions, to be used in many projects. Thes can be used as well in the IDE (via the load() command).

Can you help with this problem?

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

To post a message you must log in.