Sikuli in ANT/MAVEN/Jenkins

Asked by Heinz Chr. Dau-Schmidt

Hi,
I am evaluating Sikuli for my bachelor thesis.
Because of that, I must detect the interfaces of Sikuli with build tools like Ant, Maven, Jenkins.

I have tried to execute Sikuli Skript with using Ant Exec-Task (execute runScript.cmd). I have also added failonerror=true.
But even if Sikuli detects an error, the build is according Ant successful.

Is it possible to execute and evaluate Sikuli Skripts with Ant, Maven and Jenkins?

Greetings.

##The Question in German##
Hallo,
ich evaluiere Sikuli als GUI-Testprogramm für meine Abschlussarbeit.

Ich muss untersuchen, welche Schnittstellen das Programm mit Build-Software,
genauer gesagt Ant, Maven und Jenkins hat.
Ich hab gesehen, dass man mit runScript.cmd und den Parametern -c und -r [Pfad zum Skript] den Testfall auch über die Kommandozeile ausführen kann.

Soweit so gut, jedoch ist Ant nicht in der Lage, den Rückgabewert auszuwerten. Auch wenn ich den Testfall über den Exec-Task mit runScript.cmd erfolgreich über Ant starten kann.
D.h. wenn es einen Fehler während der Testausführung gibt, ist der Build dennoch erfolgreich (trotz failonerror=true).

Kann Sikuli durch Ant/Maven/Jenkins ausgewertet werden, oder ist dies nicht möglich?

Freundliche Grüße

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
j (j-the-k) said :
#1

You can set your return code manually with sys.exit e.g. like this at the end of your python script:

# .. run code

if (failed):
    sys.exit(1)
else:
    sys.exit(0)

so you have to determine the success of your script manually.

My bachelor thesis was about a testing framework with sikuli that was automated with jenkins and ant, so it definitely works.

If you run a pure java script, the exit code should work as far as I know.

As I am from Germany as well and wrote my bachelor thesis partly about Sikuli, I'm very curious about your thesis and what you exactly you are trying to do. Maybe you want to tell me a little more and I may be able to help you somehow.
If you want to, write me a mail to <email address hidden>

Can you help with this problem?

Provide an answer of your own, or ask Heinz Chr. Dau-Schmidt for more information if necessary.

To post a message you must log in.