I’m planning to test desktop applications on Linux (OpenSUSE). After some research, I found that the Sikuli library seems to be the best fit for my needs.
My use case is to connect to a remote Linux VM and run GUI tests there. So far, I’ve found two possible approaches:
Using VNC: This works but requires a setup that is not entirely automatable.
Using Docker: Creating a Docker image and running tests inside containers (though I haven’t fully fine-tuned this approach yet).
My question is: Is this approach valid?
Do you see any alternative solutions, like using a different library or method?
I use SikuliLibrary and ImageHorizonLibrary to test Windows apps running on Oracle VirtualBox.
I have a Linux machine which is the host of VirtualBox. The running Windows VM is accessible by RDP, provided by VirtualBox.
The other Linux machine is where robot runs and graphical output is served on xvfb. It uses the client Remmina to access by RDP the Windows VM.
I use my own build of SikuliLibrary because the official release is older. You can get it from my GitHub fork.
Like @HelioGuilherme66 I use xvfb on Linux machines to create a X11 environment, I mostly use ImageHorizonLibrary but have used SikuliLibrary (I started by using both side by side to see which I preferred)
FYI - I run the same tests on Windows Mac and Linux on Github runners
Docker or VM, both are valid approaches, it’s really just a matter of what works for you, docker containers don’t have a desktop so for them you will need xvfb, but likewise if you want to run VNC on a docker container you’ll also need xvfb. The only down side with xvfb is you can’t get remote access to the desktop unless you combine it with VNC or similar, but if it’s just for running automated tests maybe you don’t need it either, just take screenshots and view them from log.html (this is what I do)
Recently a new robot framework Library, PlatynUI, was announced, I haven’t played with it yet myself but from the doc’s it looks interesting, though there’s no Mac support for it yet, so I won’t be using it for now, but it might be useful for you.
The other thing I’ll mention, on Linux there’s currently no libraries that i know of that work on Wayland, so you need to stick with X11 (xvfb is a X11 virtual display)