views:

982

answers:

4

SIKULI seems to have an enormous amount of potential. Has anybody tried to use this as a tool for testing? Or would it be better suited for automating actions for users?

+5  A: 

Quoting Unit Testing for GUI (in the project Documentation):

Sikuli is designed to support unit testing for GUI by integrating with junit. The unit testing panel can be opened by clicking on View/Unit Test or by shortcut Cmd-U on Mac (or Ctrl-U on Windows/Linux).

So, while my understanding is that SIKULI is initially aimed at GUI automation, it can definitely be used for GUI testing (which is closely related if you consider that GUI testing = GUI automation + verification framework). Have a look at Unit testing for GUI (JEdit) for a full example (and see the assertXXX on images).

And indeed, I see a big potential in SIKULI for testing as it seems to make writing tests very easy, even without a single line of the real application written (just using some initial mockups for example). SIKULI could become a great companion for various flavor of testing (BDD, acceptance testing, etc).

It' really an amazing piece of software, very impressive.

Pascal Thivent
A: 

This video mentions that "it tolerates a little changes [sic] in their appearance." I am wary of the effort required when changes exceed "a little". The interface is impressive, but excessive false positives could easily slow testing.

trashgod
Well, my understanding is that is uses pattern recognition so I guess that more than a "little" change will require to change the corresponding GUI screenshot accordingly. I wouldn't expect anything else. (I agree that refactoring won't be a strength of the tool though).
Pascal Thivent
In the tool it is very easy to change the tolerance level, just click the image and use the GUI to adjust number of matches and adjust the slider for tolerance, from 1 (perfect match) down to 0, which is exceptionally fuzzy matching. A 0.82 for instance will ignore the hot track effect of the Windows 7 taskbar.
Robert MacLean
+1  A: 

Also, see the paper: http://groups.csail.mit.edu/uid/projects/sikuli/sikuli-chi2010.pdf

nabs
+1  A: 

Recorded a workflow with a Flex web app. Took a while to figure out a reliable strategy to create the screenshots, but once I did it, the script continued working even after I changed my desktop color scheme! The syntax gets a bit awkward though when you need to click a specific control in a collection of similar controls, i.e. checkboxes, input fields. Looks like the only way to do it is by using find() in combination with right(); left(); inside(). Seems like the smaller the screenshots are, the more reliably are they detected. Imo a good practice would be to include only significant objects on screenshots, and make them as atomic as possible but without compromising their uniqueness.