Adding own libraries in Sikuli 0.10

Asked by Vlad Chiriacescu

I'm working on a project for testing a GUI. I've got a bunch of tests that look like this:

def test001 ():
 doSomething...

The problem is that I don't want all the tests to reside in the main script, because it would make modifying the tests very difficult (there will be close to 100 tests when I'm done). What I'd like is to have each test as a separate file or folder, and then call the test I want from the main script.

I've tried exporting executables and running those from Sikuli using Windows Run command, and it works ok, except it introduces the need for some pauses and connecting elements in the script, because the GUI loses focus when using the Run command, and reacts differently to every switchApp(...) command. This makes testing unpredictable and unreliable.

Also, I don't want to use the unit testing feature for reasons I can't share at the moment.

I was thinking along the lines of custom libraries that I can import into Sikuli, but I have no idea how to create them.

Any help/idea will be greatly appreciated.

Question information

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

--- Sikuli IDE as development environment:
https://answers.launchpad.net/sikuli/+question/127275

--- Eclipse or Netbeans as main Python IDE
https://answers.launchpad.net/sikuli/+question/128341

--- calling Sikuli scripts via XML-RPC instead of using .skl
come back if interested

Revision history for this message
Vlad Chiriacescu (vchiriacescu) said :
#2

Thanks RaiMan, I've already read all those topics. As a temporary solution I'm currently using the exec open command. I'll look into more complex methods in the future.