Automated GUI Testing

Asked by Raúl Muñoz

Hi, I new in sikuli, and I would like to know if sikuly library can be useful for my actual purpose;
it consists of developing an application for doing "Automated GUI Testing".
The application under test (AUT) has to do with a desktop application (not web app) and it is written in Java (SWT), not based on Windows.
To carry out this goal, my first point of view is the following:
- First, try to record several actions on the GUI of the AUT (the actions could be transcripted in some programming language, preferably in python scripts).
- Second, automate actions by executing (replaying) the scripts recorded previously.
I think, it is mandatory to be used some kind of SWT for JAVA library.
I do not know if sikuly library may be appropriated to tackle these tasks and taking into account my not experience in sikuli.
Thanks so much in advance,

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Raúl Muñoz
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Generally the type of an AUT does not matter when using features of SikuliX, since it only works visually (on what the AUT displays on the screen seen as rectangular pixel areas).

>>> try to record several actions on the GUI of the AUT ...
Currently SikuliX does not have a working recorder feature (but it is started again in 2.0.6).

>>> automate actions by executing (replaying) the scripts recorded previously ...
With SikuliX currently you have to write down your workflow yourself. The easiest way is with SikuliX IDE, that allows to run python-lang-scripts using the bundled Jython interpreter (version 2.7). With the IDE it is also possible to setup your images by capturing from screen, that are used in your workflow to recognise the state of your AUT (based on OpenCV) and then do actions (mouse and keyboard) using JAVA AWT Robot.
Some basic app and window features and OCR based on Tesseract are also available

The SikuliX APIs are useable from Java programs (or Java aware languages), in Jython/JRuby scripting and from C-Python scripting using a java-bridge like pyjnius.

In any case the system running SikuliX based automations needs an unlocked real screen and cannot be used in parallel by the user (mouse/keyboard) without respective preparation in the workflow.

To get an impression it is recommended to read across the docs.

Tons of examples and user experiences are available in the net.

Revision history for this message
Raúl Muñoz (rmunoz63) said :
#2

Hi RaiMan, first of all; thank you for your useful reply. Now, I was using SikuliX IDE (2.0.5), I opened my AUT and I was able to see some lines of code without errors, but as I execute RUN button it ends up arising the following error: "[error] no runner available for: tacdis.csh" (tacdis.csh is the AUT). I don't know whether it might be related to some kind of dependencies, or to execution environment because the first lines of codes appear like that:

#!/bin/csh -f
ulimit
source /home/airdef/airdef/bin/environment/airdef.environment

To solve this error is being a struggle for me, I don't know if you could give me some clue to fix it.
I am working on a terminal emulator for the GNOME desktop using VTE version 0.524 + GNUTLS, where the AUT is usually running without problem.
Thank you again...

Revision history for this message
TestMechanic (ndinev) said :
#3

What OS you are using?

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

.csh files cannot be run from within the IDE.

Revision history for this message
Raúl Muñoz (rmunoz63) said :
#5

Hi RaiMan, I am working on a virtual platform with a linux distribution.
Some progress in sikulixide has been done, basically I open the application .csh by double-clicking on icon that I have in my desktop screen, and then; I do automatically some actions with some control buttons and finally close the application. This is not a great thing but it is useful for me because I am starting learning about everything. Next step, I will try to integrate these actions in the robotframework environment.
I should download a sikuli library, but I can not do it directly because the virtual platform does not have access to Internet, I mean I can not use use "pip install robotframework-SikuliLibrary" for example.
I will try to get source code from GITHUB, and use Maven to build SikuliLibrary.jar on target OS, and replace the jar file in ‘lib’ folder, or something like that.
Thank you and best regards,
Raúl

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

I do not understand, why you want to use RobotFramework (using sikulilibrary).
Using scripts in the SikuliX IDE and running them from command line is usually enough for automating an app.

With RobotFrameWork I cannot help you.

Revision history for this message
Raúl Muñoz (rmunoz63) said :
#7

Hi, the idea of using RobotFrameWork was a proposal of a workmate but I prefer to use SikuliX IDE as you mention, I see it more suitable, I deal your point of view with my colleagues. Tranks ....