Introduction

Desktop apps have been around for quite a while now. In an era where mobile and web applications often steal the spotlight, the relevance and necessity of desktop applications might seem questionable. However, despite the trend, desktop applications remain a vital part of our digital ecosystem, offering unique advantages like enhanced security, offline functionality, and tailored design for specific operating systems.

This article presents a case study on how the team at BetterQA addressed the challenge of automating tests for Windows-only desktop applications.

Understanding Desktop Applications

Desktop apps are software installed locally on a device. Their features can be customized for a specific operating system and they usually don’t require an internet connection to function. Their robust security and ability to operate offline make them an integral part of many business operations.

BetterQA’s Challenge

Recently, the team at BetterQA had to test two desktop apps designed specifically for Windows: a construction-related application for architects and a Microsoft Word plugin designed for lawyers.

How to Automate Desktop apps

When asked to elaborate on this process, our QA engineers answered: ”To automate the desktop applications, we chose an automation tool named Clicknium that works surprisingly better than Pywinauto, from where we started. With this tool, we managed to automate tests for Word plugins and for a construction-related tool that works only on Windows. For desktop applications, we use Python as the programming language integrated with the tool we chose.

If the application we test has texts that need to be validated due to the predefined functions in Python, we can extract the text from a certain element and, with the help of  REGEX expressions, extract and validate what we need from the entire text.”

Additional Steps & Strategies

This tool is useful as it helps our QA engineers identify with ease the elements of the application because due to its extension to take screenshots of an element and extract different data related to the element (name, class, index, automation ID, help text, item type, role) in the same way we have all this info for the web application. 

In this way, when the tool searches for an element, there is a complex process in the background since the tool is not searching for a specific id or a specific class, but it searches for a specific combination of all the attributes of that element. There is also a possibility to disable or enable any attributes of an element or even to change the attributes in a way it suits your test the most.

One of our QA engineers points out that “each locator must be validated whenever there is a new change in their attributes. To do this, the tool provides us a functionality to validate or revalidate each locator anytime we need. Also, when a locator is changing, the locator can be recaptured and compared with the previous one.”

They continue to add that “ to see the tree structure in the same way we see it on a web page, the tool is designed to work with an application (Inspect) that allows us to see in real-time all the details and attributes of each element. The locators can be organized in one folder or in multiple folders, depending on our needs.”

The Result of the case study

The BetterQA team’s successful automation of these Windows-only desktop applications demonstrates the enduring value of desktop applications. Their compatibility, integration, and performance within their targeted operating system environment can yield excellent results.

Compared to web and mobile apps, desktop apps came with advantages that proved helpful as they were designed to target a particular operating system: our colleague says thatthis was our case with the two apps designed to work only for Windows users. Focusing only on one operating system can result in better compatibility, integration, and performance with the target environment.”

Conclusion

The examples mentioned above clearly demonstrate that even in a world dominated by web and mobile applications, desktop applications can still be in user demand, and without proper means to automate and test these applications, companies can suffer financial losses attributed to dissatisfied users.

By sharing this case study, we hope to underscore the significance of desktop applications, especially those designed for specific operating systems. Even as the digital world continues to grow and change, the role of desktop applications remains relevant and important.

Stay Updated with the Latest in QA

The world of software testing and quality assurance is ever-evolving. To stay abreast of the latest methodologies, tools, and best practices, bookmark our blog. We’re committed to providing in-depth insights, expert opinions, and trend analysis that can help you refine your software quality processes.

Visit our Blog

Delve deeper into a range of specialized services we offer, tailored to meet the diverse needs of modern businesses. As well, hear what our clients have to say about us on Clutch!