Can I define like a main in sikuri? a way to run a serie of sikuri file one by one automatically

StackOverflow https://stackoverflow.com/questions/18408777

  •  26-06-2022
  •  | 
  •  

Question

I try to make automatic test on sikuli, I have to many TCs in sikuli files, but I need all the file on sikuli run one by one without human actions, a know I can do a batch or a sukili file who run all the files, but isn't a way to do like a main in a scrip in sikuli?

Was it helpful?

Solution

1) Sikuli can use Python modules syntax. I used it in my practice.

My old module was started like this:

# import
import sys
sys.path.append("/Program Files/Sikuli")
from sikuli.Sikuli import *

# some Sikuli functions further.

Then I imported my module like Python module in Sikuli/Python main routine and used it's functions. So you can put your TC in modules and call them from "Main" module.

2) There was some works on integrating Sikuli into Robot Framework, general purpose testing framework. You can Google them out.

Unfortunately, all that worked with Sikuli versions before 1.0 , and I just don't know how it is going now (there is one developer on Sikuli now and things don't go smooth). In general, the answer is "yes, you can" (other way or another), but I can't give clear full details now.

OTHER TIPS

You could write a shell script with all the commands you would otherwise run manually. Something like:

#!/bin/sh
sikuli-ide -r sikuli_script1
sikuli-ide -r sikuli_script2
sikuli-ide -r sikuli_script3

And so on. Afterwards just run the script.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top