Sikuli for system testing

Asked by Dave Bentley

Any body have experience of using Sikuli for system testing. I've seen mention of Unit Testing, but is Sikuli exclusivly for system test? I've done a few quick test case and was wondering what the difference is between Error, and Failure in the unit test window? If you can point me to any specific test documentation it would be helpful.

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

if you want to do serious testing with Sikuli, use the Python/Jython unit test feature directly.

The IDE test feature is a nice gimmick, but not really for professional use.

Depending on your pre-knowledge, you might decide, to use the Java API and make your tests using JUnit package.

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

Sorry, there is no specific Sikuli oriented testing docs.

For Python/Jython have a look at the official docs.

Same goes for Java: you are only using the Sikuli Java API to do the visual searching on the screen and may be the click and type/paste actions. This is how many people use Sikuli fetters as an add-on to the Selenium approach.

Revision history for this message
Dave Bentley (davebentley) said :
#3

Cheers for the reply. Still would like to know the what the difference is between Error, and Failure in the unit test window. Just in case it is something I can work with.

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

What I definitely know:
Failure means, that a test ended with an assert exception (assert(False)).

I guess, that an error means any other exception during run of a test. But that is exactly, what does not work: If your test scripts produce an exception (e.g. a simple syntax error), the test IDE will simply hang, you have to interrupt it (hopefully using the little stop button in the transparent mini window) and in many cases you have to fully restart the IDE to run your tests again.

Conclusion: Errors? I have never seen them ;-)

If interested: I have made a script containing a hack, that allows you to fully simulate the test run in normal IDE until it is error free. Then you can run it as real unit test without modification and get your statistics.
This example runs calc.exe on Windows.
The problem you might have is this line:
 ac = self.ac = App("Rechner")
It was scripted on a german Windows. Exchange the word "Rechner" with the title text of the window of calc.exe.

the last line
weAreInIDE(("testAdd",))
could be changed to run both tests in normal IDE:
weAreInIDE(("testAdd","testTypeNumber"))

download: https://files.me.com/rhocke/zpsan6

Can you help with this problem?

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

To post a message you must log in.