What libraries do you use when automating Desktop Application that works on both Windows and Linux OS? I also needed to run it in Linux OS since we are running our scripts on pipeline, which basically runs in Linux OS.
Hello rasjani, thanks for the response.
I don’t really know how to check which GUI toolkit the app is running.
But I’ll still drop a sample test scenario that I have.
Open browser, go to a website and download installer.
Launch the installer and complete installation setup.
(Completed the installation with few clicks)
(Installer file type: Windows Installer Package (.msi))
Go back with the browser and refresh the page.
(By refreshing the page, it will complete the setup and automatically opens the Application UI)
(Application file type: Application (.exe))
I only need basic interaction with the app.
(Click, Type, Select from dropdown)
Again thanks for your response and hope to here again from you!
Hello sir, good day!
After doing a simple research, looks like SikuliLibrary is the best fit for my scenario since I needed to run my scripts in OS and Windows.
Here’s a simple test scenario that I have.
Open browser, go to a website and download installer.
Launch the installer and complete installation setup.
(Completed the installation with few clicks)
(Installer file type: Windows Installer Package (.msi))
Go back with the browser and refresh the page.
(By refreshing the page, it will complete the setup and automatically opens the Application UI)
(Application file type: Application (.exe))
I only need basic interaction with the app.
(Click, Type, Select from dropdown)
Again thanks for your response and hope to here again from you!
Firstly do you need to use a web browser to download the app? If not and the download url is static, it might be easier to use requests library with the direct url to the download file.
Next, the install procedure will be different for Windows and Linux (and MacOS if that’s on the radar), so you will need to create separate steps for that, I’ll suggest putting them in a keyword called something like Install AppName Windows and Install AppName Linux
Then the next challenge you will face is the presentation layer for each OS will render components differently, so even though it’s the same application the image screenshot from Windows will fail on Linux and vise versa, it’s little things that will mess it up like the shape of buttons and option lists etc.
I tried both SikuliLibrary and ImageHorizonLibrary, in the end I went with ImageHorizonLibrary because it’s pure python where as SikuliLibrary uses SikuliX which is a Java app and I wanted to reduce the number of dependencies installed on my test machines.
I wanted to use the same test cases on Windows, Linux and MacOS for my app, so a tip if you want to do that, name your image prefixed with the platform name (see above to get the platform) so for example the help button would be called Windows_help_button.png and Linux_help_button.png, in your test case to click the help button you would then do
Click ${platform}_help_button.png
My next tip is about the screenshots themselves, try to make the images you want to match as small as possible while still uniquely identifying the area. For example this will give you a better match:
than this:
Hi damies13,
The download url is static but I still need to interact with the browser to automatically open the Application. Web Automation is my forte so I’ll just maximize this for now.
For install procedure, I already have this in mind since I have similar scenario on my Web Automation.
A question for you, do you also run your tests in pipelines/docker container? On my case we already have this setup, what do you think will be the challenges?
Thanks again for your valuable feedback! I really appreciate it
I run my tests in Github Actions triggered by git check-in, not sure whether they are containers or virtual machines, I just tell Github I want the OS and Python versions I want and they spin them up.
In my case the application I’m testing is written in python and uses thinter for the GUI, so I don’t have any install to worry about, all the dependencies can be installed with pip along with robot framework.
Actually the tips I gave you are the way to deal with the biggest challenges I encountered, beyond that taking the screen shots of all the application elements is time consuming (not hard just takes a lot of time) for this type of testing, I get the robot tests to take full screen screen shots at certain points in the test cases (on screen changes in the app) so that I have a screen shot of the element for all OS’s that I can use as a source image to copy/crop out the next elements I need to automate.
Thanks for your feedback. This will help me a lot building my first Desktop App Automation. I’ll probably reply or post another topic when something went wrong. Again, thank you!